diff options
author | Christian Kandeler <christian.kandeler@nokia.com> | 2011-01-19 10:16:47 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@nokia.com> | 2011-01-19 11:07:14 +0100 |
commit | 2ec85cc67a05b6227b65cd28f324745be61abfd7 (patch) | |
tree | a5ce7c08ea7369723f6f1861a80d96798e90181f /src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp | |
parent | 3af81887845fce2b7b320057e661e15cf700e93b (diff) | |
download | qt-creator-2ec85cc67a05b6227b65cd28f324745be61abfd7.tar.gz |
Maemo: Make some stateless functions static.
Diffstat (limited to 'src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp')
-rw-r--r-- | src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp index 294c196736..6aad120be2 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp @@ -45,7 +45,6 @@ #include "qt4maemotargetfactory.h" #include <extensionsystem/pluginmanager.h> -#include <qt4projectmanager/qt4projectmanagerconstants.h> #include <qt4projectmanager/qtversionmanager.h> #include <QtCore/QDir> @@ -110,45 +109,6 @@ MaemoManager &MaemoManager::instance() return *m_instance; } -bool MaemoManager::isMaemoTargetId(const QString &id) const -{ - return id == QLatin1String(Constants::MAEMO5_DEVICE_TARGET_ID) - || id == QLatin1String(Constants::HARMATTAN_DEVICE_TARGET_ID); -} - -bool MaemoManager::isValidMaemo5QtVersion(const QtVersion *version) const -{ - return isValidMaemoQtVersion(version, MaemoGlobal::Maemo5); -} - -bool MaemoManager::isValidHarmattanQtVersion(const QtVersion *version) const -{ - return isValidMaemoQtVersion(version, MaemoGlobal::Maemo6); -} - -bool MaemoManager::isValidMaemoQtVersion(const QtVersion *qtVersion, - MaemoGlobal::MaemoVersion maemoVersion) const -{ - if (MaemoGlobal::version(qtVersion) != maemoVersion) - return false; - QProcess madAdminProc; - const QStringList arguments(QLatin1String("list")); - if (!MaemoGlobal::callMadAdmin(madAdminProc, arguments, qtVersion)) - return false; - if (!madAdminProc.waitForStarted() || !madAdminProc.waitForFinished()) - return false; - - madAdminProc.setReadChannel(QProcess::StandardOutput); - const QByteArray targetName = MaemoGlobal::targetName(qtVersion).toAscii(); - while (madAdminProc.canReadLine()) { - const QByteArray &line = madAdminProc.readLine(); - if (line.contains(targetName) - && (line.contains("(installed)") || line.contains("(default)"))) - return true; - } - return false; -} - ToolChain* MaemoManager::maemo5ToolChain(const QtVersion *version) const { return new Maemo5ToolChain(version); |