Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
69100c35
Commit
69100c35
authored
Feb 24, 2010
by
Tobias Hunger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a special target for Qt simulator
parent
44a155c6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
1 deletion
+45
-1
src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
+1
-0
src/plugins/qt4projectmanager/qt4target.cpp
src/plugins/qt4projectmanager/qt4target.cpp
+8
-1
src/plugins/qt4projectmanager/qtoptionspage.cpp
src/plugins/qt4projectmanager/qtoptionspage.cpp
+2
-0
src/plugins/qt4projectmanager/qtversionmanager.cpp
src/plugins/qt4projectmanager/qtversionmanager.cpp
+32
-0
src/plugins/qt4projectmanager/qtversionmanager.h
src/plugins/qt4projectmanager/qtversionmanager.h
+2
-0
No files found.
src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
View file @
69100c35
...
...
@@ -94,6 +94,7 @@ const char * const DESKTOP_TARGET_ID("Qt4ProjectManager.Target.DesktopTarget");
const
char
*
const
S60_EMULATOR_TARGET_ID
(
"Qt4ProjectManager.Target.S60EmulatorTarget"
);
const
char
*
const
S60_DEVICE_TARGET_ID
(
"Qt4ProjectManager.Target.S60DeviceTarget"
);
const
char
*
const
MAEMO_DEVICE_TARGET_ID
(
"Qt4ProjectManager.Target.MaemoDeviceTarget"
);
const
char
*
const
QT_SIMULATOR_TARGET_ID
(
"Qt4ProjectManager.Target.QtSimulatorTarget"
);
}
// namespace Constants
}
// namespace Qt4ProjectManager
...
...
src/plugins/qt4projectmanager/qt4target.cpp
View file @
69100c35
...
...
@@ -65,6 +65,8 @@ QString displayNameForId(const QString &id) {
return
QApplication
::
translate
(
"Qt4ProjectManager::Internal::Qt4Target"
,
"Symbian Device"
,
"Qt4 Symbian Device target display name"
);
if
(
id
==
QLatin1String
(
Constants
::
MAEMO_DEVICE_TARGET_ID
))
return
QApplication
::
translate
(
"Qt4ProjectManager::Internal::Qt4Target"
,
"Maemo"
,
"Qt4 Maemo target display name"
);
if
(
id
==
QLatin1String
(
Constants
::
QT_SIMULATOR_TARGET_ID
))
return
QApplication
::
translate
(
"Qt4ProjectManager::Internal::Qt4Target"
,
"Qt Simulator"
,
"Qt4 Simulator target display name"
);
return
QString
();
}
...
...
@@ -77,6 +79,8 @@ QIcon iconForId(const QString &id) {
return
QIcon
(
":/projectexplorer/images/SymbianDevice.png"
);
if
(
id
==
QLatin1String
(
Constants
::
MAEMO_DEVICE_TARGET_ID
))
return
QIcon
(
":/projectexplorer/images/MaemoDevice.png"
);
if
(
id
==
QLatin1String
(
Constants
::
QT_SIMULATOR_TARGET_ID
))
return
QIcon
(
":/projectexplorer/images/SymbianEmulator.png"
);
return
QIcon
();
}
...
...
@@ -315,7 +319,8 @@ Qt4BuildConfigurationFactory *Qt4Target::buildConfigurationFactory() const
void
Qt4Target
::
addRunConfigurationForPath
(
const
QString
&
proFilePath
)
{
if
(
id
()
==
QLatin1String
(
Constants
::
DESKTOP_TARGET_ID
))
if
(
id
()
==
QLatin1String
(
Constants
::
DESKTOP_TARGET_ID
)
||
id
()
==
QLatin1String
(
Constants
::
QT_SIMULATOR_TARGET_ID
))
addRunConfiguration
(
new
Qt4RunConfiguration
(
this
,
proFilePath
));
else
if
(
id
()
==
QLatin1String
(
Constants
::
S60_EMULATOR_TARGET_ID
))
addRunConfiguration
(
new
S60EmulatorRunConfiguration
(
this
,
proFilePath
));
...
...
@@ -370,6 +375,8 @@ QString Qt4Target::defaultBuildDirectory() const
shortName
=
QLatin1String
(
"symbian"
);
else
if
(
id
()
==
QLatin1String
(
Constants
::
MAEMO_DEVICE_TARGET_ID
))
shortName
=
QLatin1String
(
"maemo"
);
else
if
(
id
()
==
QLatin1String
(
Constants
::
QT_SIMULATOR_TARGET_ID
))
shortName
=
QLatin1String
(
"simulator"
);
// currently we can't have the build directory to be deeper then the source directory
// since that is broken in qmake
...
...
src/plugins/qt4projectmanager/qtoptionspage.cpp
View file @
69100c35
...
...
@@ -528,6 +528,8 @@ void QtOptionsPageWidget::showEnvironmentPage(QTreeWidgetItem *item)
envs
=
tr
(
"Symbian"
,
"Qt Version is meant for Symbian"
);
else
if
(
targets
.
contains
(
Constants
::
MAEMO_DEVICE_TARGET_ID
))
envs
=
tr
(
"Maemo"
,
"Qt Version is meant for Maemo"
);
else
if
(
targets
.
contains
(
Constants
::
QT_SIMULATOR_TARGET_ID
))
envs
=
tr
(
"Qt Simulator"
,
"Qt Version is meant for Qt Simulator"
);
else
envs
=
tr
(
"unkown"
,
"No idea what this Qt Version is meant for!"
);
m_ui
->
errorLabel
->
setText
(
tr
(
"Found Qt version %1, using mkspec %2 (%3)"
)
...
...
src/plugins/qt4projectmanager/qtversionmanager.cpp
View file @
69100c35
...
...
@@ -47,6 +47,7 @@
#include <help/helpmanager.h>
#include <utils/qtcassert.h>
#include <QtCore/QFile>
#include <QtCore/QProcess>
#include <QtCore/QSettings>
#include <QtCore/QTime>
...
...
@@ -1420,6 +1421,31 @@ void QtVersion::updateToolChainAndMkspec() const
delete
reader
;
ProFileCacheManager
::
instance
()
->
decRefCount
();
m_toolChainUpToDate
=
true
;
// Check qconfig.h for QT_SIMULATOR define on desktop builds and switch the
// Qt version to Qt simulator target:
if
(
m_targetIds
.
contains
(
Constants
::
DESKTOP_TARGET_ID
))
{
QString
path
(
headerInstallPath
());
path
.
append
(
QLatin1String
(
"/Qt/qconfig.h"
));
QFile
qconfig
(
path
);
if
(
!
qconfig
.
exists
())
return
;
qconfig
.
open
(
QIODevice
::
ReadOnly
);
QTextStream
stream
(
&
qconfig
);
QString
line
;
bool
isSimulator
=
false
;
while
(
!
(
line
=
stream
.
readLine
()).
isNull
())
{
if
(
line
.
startsWith
(
QLatin1String
(
"#define QT_SIMULATOR"
)))
{
isSimulator
=
true
;
break
;
}
}
qconfig
.
close
();
if
(
isSimulator
)
{
m_targetIds
.
remove
(
QLatin1String
(
Constants
::
DESKTOP_TARGET_ID
));
m_targetIds
.
insert
(
QLatin1String
(
Constants
::
QT_SIMULATOR_TARGET_ID
));
}
}
}
QString
QtVersion
::
mwcDirectory
()
const
...
...
@@ -1590,6 +1616,12 @@ QString QtVersion::demosPath() const
return
m_versionInfo
[
"QT_INSTALL_DEMOS"
];
}
QString
QtVersion
::
headerInstallPath
()
const
{
updateVersionInfo
();
return
m_versionInfo
[
"QT_INSTALL_HEADERS"
];
}
bool
QtVersion
::
hasExamples
()
const
{
updateVersionInfo
();
...
...
src/plugins/qt4projectmanager/qtversionmanager.h
View file @
69100c35
...
...
@@ -123,6 +123,8 @@ public:
bool
hasDemos
()
const
;
QString
demosPath
()
const
;
QString
headerInstallPath
()
const
;
// All valid Ids are >= 0
int
uniqueId
()
const
;
bool
isQt64Bit
()
const
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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