Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
29e8e70b
Commit
29e8e70b
authored
Apr 06, 2010
by
ck
Browse files
Add skeleton for Maemo package creation build step.
(No actual functionality yet.) Reviewed-by: kh1
parent
4ba9a1b0
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp
View file @
29e8e70b
...
...
@@ -32,6 +32,7 @@
#include
"maemodeviceconfigurations.h"
#include
"maemogdbsettingspage.h"
#include
"maemopackagecreationfactory.h"
#include
"maemorunfactories.h"
#include
"maemosettingspage.h"
#include
"maemotoolchain.h"
...
...
@@ -63,6 +64,7 @@ MaemoManager::MaemoManager()
:
QObject
(
0
)
,
m_runControlFactory
(
new
MaemoRunControlFactory
(
this
))
,
m_runConfigurationFactory
(
new
MaemoRunConfigurationFactory
(
this
))
,
m_packageCreationFactory
(
new
MaemoPackageCreationFactory
(
this
))
,
m_settingsPage
(
new
MaemoSettingsPage
(
this
))
,
m_gdbSettingsPage
(
new
MaemoGdbSettingsPage
(
this
))
,
m_qemuCommand
(
0
)
...
...
@@ -76,18 +78,24 @@ MaemoManager::MaemoManager()
icon
.
addFile
(
":/qt-maemo/images/qemu-stop.png"
,
iconSize
,
QIcon
::
Normal
,
QIcon
::
On
);
ExtensionSystem
::
PluginManager
::
instance
()
->
addObject
(
m_runControlFactory
);
ExtensionSystem
::
PluginManager
::
instance
()
->
addObject
(
m_runConfigurationFactory
);
ExtensionSystem
::
PluginManager
::
instance
()
->
addObject
(
m_settingsPage
);
ExtensionSystem
::
PluginManager
::
instance
()
->
addObject
(
m_gdbSettingsPage
);
ExtensionSystem
::
PluginManager
*
pluginManager
=
ExtensionSystem
::
PluginManager
::
instance
();
pluginManager
->
addObject
(
m_runControlFactory
);
pluginManager
->
addObject
(
m_runConfigurationFactory
);
pluginManager
->
addObject
(
m_packageCreationFactory
);
pluginManager
->
addObject
(
m_settingsPage
);
pluginManager
->
addObject
(
m_gdbSettingsPage
);
}
MaemoManager
::~
MaemoManager
()
{
ExtensionSystem
::
PluginManager
::
instance
()
->
removeObject
(
m_runControlFactory
);
ExtensionSystem
::
PluginManager
::
instance
()
->
removeObject
(
m_runConfigurationFactory
);
ExtensionSystem
::
PluginManager
::
instance
()
->
removeObject
(
m_settingsPage
);
ExtensionSystem
::
PluginManager
::
instance
()
->
removeObject
(
m_gdbSettingsPage
);
ExtensionSystem
::
PluginManager
*
pluginManager
=
ExtensionSystem
::
PluginManager
::
instance
();
pluginManager
->
removeObject
(
m_runControlFactory
);
pluginManager
->
removeObject
(
m_runConfigurationFactory
);
pluginManager
->
removeObject
(
m_packageCreationFactory
);
pluginManager
->
removeObject
(
m_settingsPage
);
pluginManager
->
removeObject
(
m_gdbSettingsPage
);
m_instance
=
0
;
}
...
...
src/plugins/qt4projectmanager/qt-maemo/maemomanager.h
View file @
29e8e70b
...
...
@@ -54,6 +54,7 @@ namespace Qt4ProjectManager {
namespace
Internal
{
class
MaemoGdbSettingsPage
;
class
MaemoPackageCreationFactory
;
class
MaemoRunControlFactory
;
class
MaemoRunConfigurationFactory
;
class
MaemoSettingsPage
;
...
...
@@ -90,6 +91,7 @@ private:
MaemoRunControlFactory
*
m_runControlFactory
;
MaemoRunConfigurationFactory
*
m_runConfigurationFactory
;
MaemoPackageCreationFactory
*
m_packageCreationFactory
;
MaemoSettingsPage
*
m_settingsPage
;
MaemoGdbSettingsPage
*
m_gdbSettingsPage
;
...
...
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationfactory.cpp
0 → 100644
View file @
29e8e70b
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of Qt Creator.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include
"maemopackagecreationfactory.h"
#include
"maemopackagecreationstep.h"
#include
<projectexplorer/buildconfiguration.h>
#include
<projectexplorer/target.h>
#include
<qt4projectmanagerconstants.h>
using
ProjectExplorer
::
BuildConfiguration
;
using
ProjectExplorer
::
StepType
;
using
ProjectExplorer
::
BuildStep
;
namespace
Qt4ProjectManager
{
namespace
Internal
{
MaemoPackageCreationFactory
::
MaemoPackageCreationFactory
(
QObject
*
parent
)
:
ProjectExplorer
::
IBuildStepFactory
(
parent
)
{
}
QStringList
MaemoPackageCreationFactory
::
availableCreationIds
(
BuildConfiguration
*
parent
,
StepType
type
)
const
{
QStringList
ids
;
if
(
type
==
ProjectExplorer
::
Build
&&
parent
->
target
()
->
id
()
==
Constants
::
MAEMO_DEVICE_TARGET_ID
)
ids
<<
MaemoPackageCreationStep
::
CreatePackageId
;
return
ids
;
}
QString
MaemoPackageCreationFactory
::
displayNameForId
(
const
QString
&
id
)
const
{
return
id
==
MaemoPackageCreationStep
::
CreatePackageId
?
tr
(
"Maemo Package Creation"
)
:
QString
();
}
bool
MaemoPackageCreationFactory
::
canCreate
(
BuildConfiguration
*
parent
,
StepType
type
,
const
QString
&
id
)
const
{
return
type
==
ProjectExplorer
::
Build
&&
id
==
MaemoPackageCreationStep
::
CreatePackageId
&&
parent
->
target
()
->
id
()
==
Constants
::
MAEMO_DEVICE_TARGET_ID
;
}
BuildStep
*
MaemoPackageCreationFactory
::
create
(
BuildConfiguration
*
parent
,
ProjectExplorer
::
StepType
type
,
const
QString
&
id
)
{
Q_ASSERT
(
canCreate
(
parent
,
type
,
id
));
return
new
MaemoPackageCreationStep
(
parent
);
}
bool
MaemoPackageCreationFactory
::
canRestore
(
BuildConfiguration
*
parent
,
StepType
type
,
const
QVariantMap
&
map
)
const
{
qDebug
(
"%s: %d"
,
Q_FUNC_INFO
,
canCreate
(
parent
,
type
,
ProjectExplorer
::
idFromMap
(
map
)));
return
canCreate
(
parent
,
type
,
ProjectExplorer
::
idFromMap
(
map
));
}
BuildStep
*
MaemoPackageCreationFactory
::
restore
(
BuildConfiguration
*
parent
,
StepType
type
,
const
QVariantMap
&
map
)
{
Q_ASSERT
(
canRestore
(
parent
,
type
,
map
));
return
new
MaemoPackageCreationStep
(
parent
);
}
bool
MaemoPackageCreationFactory
::
canClone
(
BuildConfiguration
*
parent
,
StepType
type
,
BuildStep
*
product
)
const
{
return
canCreate
(
parent
,
type
,
product
->
id
());
}
BuildStep
*
MaemoPackageCreationFactory
::
clone
(
BuildConfiguration
*
parent
,
StepType
type
,
BuildStep
*
product
)
{
Q_ASSERT
(
canClone
(
parent
,
type
,
product
));
return
new
MaemoPackageCreationStep
(
parent
,
static_cast
<
MaemoPackageCreationStep
*>
(
product
));
}
}
// namespace Internal
}
// namespace Qt4ProjectManager
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationfactory.h
0 → 100644
View file @
29e8e70b
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of Qt Creator.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef MAEMOPACKAGECREATIONFACTORY_H
#define MAEMOPACKAGECREATIONFACTORY_H
#include
<projectexplorer/buildstep.h>
namespace
Qt4ProjectManager
{
namespace
Internal
{
class
MaemoPackageCreationFactory
:
public
ProjectExplorer
::
IBuildStepFactory
{
public:
MaemoPackageCreationFactory
(
QObject
*
parent
);
virtual
QStringList
availableCreationIds
(
ProjectExplorer
::
BuildConfiguration
*
parent
,
ProjectExplorer
::
StepType
type
)
const
;
virtual
QString
displayNameForId
(
const
QString
&
id
)
const
;
virtual
bool
canCreate
(
ProjectExplorer
::
BuildConfiguration
*
parent
,
ProjectExplorer
::
StepType
type
,
const
QString
&
id
)
const
;
virtual
ProjectExplorer
::
BuildStep
*
create
(
ProjectExplorer
::
BuildConfiguration
*
parent
,
ProjectExplorer
::
StepType
type
,
const
QString
&
id
);
virtual
bool
canRestore
(
ProjectExplorer
::
BuildConfiguration
*
parent
,
ProjectExplorer
::
StepType
type
,
const
QVariantMap
&
map
)
const
;
virtual
ProjectExplorer
::
BuildStep
*
restore
(
ProjectExplorer
::
BuildConfiguration
*
parent
,
ProjectExplorer
::
StepType
type
,
const
QVariantMap
&
map
);
virtual
bool
canClone
(
ProjectExplorer
::
BuildConfiguration
*
parent
,
ProjectExplorer
::
StepType
type
,
ProjectExplorer
::
BuildStep
*
product
)
const
;
virtual
ProjectExplorer
::
BuildStep
*
clone
(
ProjectExplorer
::
BuildConfiguration
*
parent
,
ProjectExplorer
::
StepType
type
,
ProjectExplorer
::
BuildStep
*
product
);
};
}
// namespace Internal
}
// namespace Qt4ProjectManager
#endif // MAEMOPACKAGECREATIONFACTORY_H
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
0 → 100644
View file @
29e8e70b
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of Qt Creator.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include
"maemopackagecreationstep.h"
#include
<QtGui/QWidget>
using
ProjectExplorer
::
BuildConfiguration
;
using
ProjectExplorer
::
BuildStepConfigWidget
;
namespace
Qt4ProjectManager
{
namespace
Internal
{
class
MaemoPackageCreationWidget
:
public
ProjectExplorer
::
BuildStepConfigWidget
{
public:
MaemoPackageCreationWidget
(
MaemoPackageCreationStep
*
step
)
:
ProjectExplorer
::
BuildStepConfigWidget
(),
m_step
(
step
)
{}
virtual
void
init
()
{}
virtual
QString
summaryText
()
const
{
return
tr
(
"Package Creation"
);
}
virtual
QString
displayName
()
const
{
return
m_step
->
displayName
();
}
private:
MaemoPackageCreationStep
*
m_step
;
};
MaemoPackageCreationStep
::
MaemoPackageCreationStep
(
BuildConfiguration
*
buildConfig
)
:
ProjectExplorer
::
BuildStep
(
buildConfig
,
CreatePackageId
)
{
}
MaemoPackageCreationStep
::
MaemoPackageCreationStep
(
BuildConfiguration
*
buildConfig
,
MaemoPackageCreationStep
*
other
)
:
BuildStep
(
buildConfig
,
other
)
{
}
bool
MaemoPackageCreationStep
::
init
()
{
return
true
;
}
void
MaemoPackageCreationStep
::
run
(
QFutureInterface
<
bool
>
&
fi
)
{
qDebug
(
"%s"
,
Q_FUNC_INFO
);
fi
.
reportResult
(
true
);
}
BuildStepConfigWidget
*
MaemoPackageCreationStep
::
createConfigWidget
()
{
return
new
MaemoPackageCreationWidget
(
this
);
}
const
QLatin1String
MaemoPackageCreationStep
::
CreatePackageId
(
"Qt4ProjectManager.MaemoPackageCreationStep"
);
}
// namespace Internal
}
// namespace Qt4ProjectManager
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h
0 → 100644
View file @
29e8e70b
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of Qt Creator.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef MAEMOPACKAGECREATIONSTEP_H
#define MAEMOPACKAGECREATIONSTEP_H
#include
<projectexplorer/buildstep.h>
namespace
Qt4ProjectManager
{
namespace
Internal
{
class
MaemoPackageCreationStep
:
public
ProjectExplorer
::
BuildStep
{
friend
class
MaemoPackageCreationFactory
;
public:
MaemoPackageCreationStep
(
ProjectExplorer
::
BuildConfiguration
*
buildConfig
);
private:
MaemoPackageCreationStep
(
ProjectExplorer
::
BuildConfiguration
*
buildConfig
,
MaemoPackageCreationStep
*
other
);
virtual
bool
init
();
virtual
void
run
(
QFutureInterface
<
bool
>
&
fi
);
virtual
ProjectExplorer
::
BuildStepConfigWidget
*
createConfigWidget
();
virtual
bool
immutable
()
const
{
return
true
;
}
static
const
QLatin1String
CreatePackageId
;
};
}
// namespace Internal
}
// namespace Qt4ProjectManager
#endif // MAEMOPACKAGECREATIONSTEP_H
src/plugins/qt4projectmanager/qt-maemo/qt-maemo.pri
View file @
29e8e70b
...
...
@@ -16,7 +16,9 @@ HEADERS += \
$$PWD/maemosettingswidget.h \
$$PWD/maemosshconnection.h \
$$PWD/maemosshthread.h \
$$PWD/maemotoolchain.h
$$PWD/maemotoolchain.h \
$$PWD/maemopackagecreationstep.h \
$$PWD/maemopackagecreationfactory.h
SOURCES += \
$$PWD/maemoconfigtestdialog.cpp \
...
...
@@ -31,7 +33,9 @@ SOURCES += \
$$PWD/maemosettingswidget.cpp \
$$PWD/maemosshconnection.cpp \
$$PWD/maemosshthread.cpp \
$$PWD/maemotoolchain.cpp
$$PWD/maemotoolchain.cpp \
$$PWD/maemopackagecreationstep.cpp \
$$PWD/maemopackagecreationfactory.cpp
FORMS += \
$$PWD/maemoconfigtestdialog.ui \
...
...
src/plugins/qt4projectmanager/qt4target.cpp
View file @
29e8e70b
...
...
@@ -35,6 +35,7 @@
#include
"qt4project.h"
#include
"qt4runconfiguration.h"
#include
"qt4projectmanagerconstants.h"
#include
"qt-maemo/maemopackagecreationstep.h"
#include
"qt-maemo/maemorunconfiguration.h"
#include
"qt-s60/s60devicerunconfiguration.h"
#include
"qt-s60/s60emulatorrunconfiguration.h"
...
...
@@ -279,6 +280,8 @@ Qt4BuildConfiguration *Qt4Target::addQt4BuildConfiguration(QString displayName,
if
(
id
()
==
Constants
::
S60_DEVICE_TARGET_ID
)
{
S60CreatePackageStep
*
packageStep
=
new
S60CreatePackageStep
(
bc
);
bc
->
insertStep
(
ProjectExplorer
::
Build
,
2
,
packageStep
);
}
else
if
(
id
()
==
Constants
::
MAEMO_DEVICE_TARGET_ID
)
{
bc
->
insertStep
(
ProjectExplorer
::
Build
,
2
,
new
MaemoPackageCreationStep
(
bc
));
}
MakeStep
*
cleanStep
=
new
MakeStep
(
bc
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment