| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | /**************************************************************************
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | ** | 
					
						
							|  |  |  | ** This file is part of Qt Creator | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2010-03-05 11:25:49 +01:00
										 |  |  | ** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-06-17 00:01:27 +10:00
										 |  |  | ** Contact: Nokia Corporation (qt-info@nokia.com) | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | ** Commercial Usage | 
					
						
							| 
									
										
										
										
											2008-12-02 14:17:16 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | ** Licensees holding valid Qt Commercial licenses may use this file in | 
					
						
							|  |  |  | ** accordance with the Qt Commercial License Agreement provided with the | 
					
						
							|  |  |  | ** Software or, alternatively, in accordance with the terms contained in | 
					
						
							|  |  |  | ** a written agreement between you and Nokia. | 
					
						
							| 
									
										
										
										
											2008-12-02 14:17:16 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | ** GNU Lesser General Public License Usage | 
					
						
							| 
									
										
										
										
											2008-12-02 14:17:16 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | ** 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.
 | 
					
						
							| 
									
										
										
										
											2008-12-02 14:17:16 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | ** If you are unsure which license is appropriate for your use, please | 
					
						
							| 
									
										
										
										
											2009-08-14 09:30:56 +02:00
										 |  |  | ** contact the sales department at http://qt.nokia.com/contact.
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2009-02-25 09:15:00 +01:00
										 |  |  | **************************************************************************/ | 
					
						
							| 
									
										
										
										
											2008-12-02 16:19:05 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | #ifndef QTVERSIONMANAGER_H
 | 
					
						
							|  |  |  | #define QTVERSIONMANAGER_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-28 12:43:04 +02:00
										 |  |  | #include <projectexplorer/environment.h>
 | 
					
						
							|  |  |  | #include <projectexplorer/toolchain.h>
 | 
					
						
							| 
									
										
										
										
											2009-10-22 17:43:36 +02:00
										 |  |  | #include <QSharedPointer>
 | 
					
						
							| 
									
										
										
										
											2008-12-02 16:19:05 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-23 12:52:51 +02:00
										 |  |  | #include <QtCore/QHash>
 | 
					
						
							| 
									
										
										
										
											2010-02-11 18:01:52 +01:00
										 |  |  | #include <QtCore/QSet>
 | 
					
						
							| 
									
										
										
										
											2009-10-08 18:37:18 +02:00
										 |  |  | #include <QtCore/QSharedPointer>
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-22 14:22:16 +02:00
										 |  |  | namespace ProjectExplorer { | 
					
						
							|  |  |  |     class ToolChain; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-28 12:43:04 +02:00
										 |  |  | namespace Qt4ProjectManager { | 
					
						
							| 
									
										
										
										
											2009-04-22 14:52:35 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | namespace Internal { | 
					
						
							| 
									
										
										
										
											2009-04-23 13:23:46 +02:00
										 |  |  | class QtOptionsPageWidget; | 
					
						
							| 
									
										
										
										
											2009-04-23 16:05:51 +02:00
										 |  |  | class QtOptionsPage; | 
					
						
							| 
									
										
										
										
											2009-04-23 12:52:51 +02:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-28 12:43:04 +02:00
										 |  |  | class QtVersion | 
					
						
							| 
									
										
										
										
											2009-03-20 16:13:46 +01:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     friend class QtVersionManager; | 
					
						
							|  |  |  | public: | 
					
						
							| 
									
										
										
										
											2009-10-22 14:23:46 +02:00
										 |  |  |     QtVersion(const QString &name, const QString &qmakeCommand, | 
					
						
							| 
									
										
										
										
											2009-05-28 13:22:23 +02:00
										 |  |  |               bool isAutodetected = false, const QString &autodetectionSource = QString()); | 
					
						
							| 
									
										
										
										
											2009-09-03 19:16:22 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     QtVersion(const QString &path, bool isAutodetected = false, const QString &autodetectionSource = QString()); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-22 14:23:46 +02:00
										 |  |  |     QtVersion(const QString &name, const QString &qmakeCommand, int id, | 
					
						
							| 
									
										
										
										
											2009-05-28 11:48:33 +02:00
										 |  |  |               bool isAutodetected = false, const QString &autodetectionSource = QString()); | 
					
						
							| 
									
										
										
										
											2009-09-03 19:45:09 +02:00
										 |  |  |     QtVersion(); | 
					
						
							| 
									
										
										
										
											2009-05-25 16:43:50 +02:00
										 |  |  |     ~QtVersion(); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     bool isValid() const; //TOOD check that the dir exists and the name is non empty
 | 
					
						
							| 
									
										
										
										
											2010-01-12 15:46:23 +01:00
										 |  |  |     QString invalidReason() const; | 
					
						
							| 
									
										
										
										
											2009-05-28 11:31:35 +02:00
										 |  |  |     bool isAutodetected() const { return m_isAutodetected; } | 
					
						
							| 
									
										
										
										
											2009-05-28 11:48:33 +02:00
										 |  |  |     QString autodetectionSource() const { return m_autodetectionSource; } | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-07 18:17:24 +01:00
										 |  |  |     QString displayName() const; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     QString sourcePath() const; | 
					
						
							|  |  |  |     QString qmakeCommand() const; | 
					
						
							| 
									
										
										
										
											2009-05-12 14:12:20 +02:00
										 |  |  |     QString uicCommand() const; | 
					
						
							| 
									
										
										
										
											2009-05-19 14:54:52 +02:00
										 |  |  |     QString designerCommand() const; | 
					
						
							|  |  |  |     QString linguistCommand() const; | 
					
						
							| 
									
										
										
										
											2009-06-09 18:02:23 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-08 15:50:06 +01:00
										 |  |  |     bool supportsTargetId(const QString &id) const; | 
					
						
							|  |  |  |     QSet<QString> supportedTargetIds() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-09 18:02:23 +02:00
										 |  |  |     QList<ProjectExplorer::ToolChain::ToolChainType> possibleToolChainTypes() const; | 
					
						
							| 
									
										
										
										
											2009-10-22 17:09:28 +02:00
										 |  |  |     ProjectExplorer::ToolChain *toolChain(ProjectExplorer::ToolChain::ToolChainType type) const; | 
					
						
							| 
									
										
										
										
											2009-10-22 14:22:16 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /// @returns the name of the mkspec, which is generally not enough
 | 
					
						
							|  |  |  |     /// to pass to qmake.
 | 
					
						
							|  |  |  |     QString mkspec() const; | 
					
						
							|  |  |  |     /// @returns the full path to the default directory
 | 
					
						
							|  |  |  |     /// specifally not the directory the symlink/ORIGINAL_QMAKESPEC points to
 | 
					
						
							|  |  |  |     QString mkspecPath() const; | 
					
						
							| 
									
										
										
										
											2009-05-19 14:54:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-07 18:17:24 +01:00
										 |  |  |     void setDisplayName(const QString &name); | 
					
						
							| 
									
										
										
										
											2009-09-03 19:16:22 +02:00
										 |  |  |     void setQMakeCommand(const QString &path); | 
					
						
							| 
									
										
										
										
											2009-05-28 13:22:23 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-08 14:20:35 +01:00
										 |  |  |     QString qtVersionString() const; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     // Returns the PREFIX, BINPREFIX, DOCPREFIX and similar information
 | 
					
						
							|  |  |  |     QHash<QString,QString> versionInfo() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-04 10:50:44 +02:00
										 |  |  |     QString mwcDirectory() const; | 
					
						
							|  |  |  |     void setMwcDirectory(const QString &directory); | 
					
						
							| 
									
										
										
										
											2009-10-27 17:59:53 +01:00
										 |  |  |     QString s60SDKDirectory() const; | 
					
						
							|  |  |  |     void setS60SDKDirectory(const QString &directory); | 
					
						
							| 
									
										
										
										
											2009-10-29 12:19:56 +01:00
										 |  |  |     QString gcceDirectory() const; | 
					
						
							|  |  |  |     void setGcceDirectory(const QString &directory); | 
					
						
							| 
									
										
										
										
											2009-11-04 19:14:17 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     QString mingwDirectory() const; | 
					
						
							|  |  |  |     void setMingwDirectory(const QString &directory); | 
					
						
							|  |  |  |     QString msvcVersion() const; | 
					
						
							|  |  |  |     void setMsvcVersion(const QString &version); | 
					
						
							| 
									
										
										
										
											2009-05-25 16:43:50 +02:00
										 |  |  |     void addToEnvironment(ProjectExplorer::Environment &env) const; | 
					
						
							| 
									
										
										
										
											2009-04-23 13:48:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-25 15:18:37 +01:00
										 |  |  |     bool hasDebuggingHelper() const; | 
					
						
							| 
									
										
										
										
											2009-04-24 14:59:47 +02:00
										 |  |  |     QString debuggingHelperLibrary() const; | 
					
						
							| 
									
										
										
										
											2009-07-15 17:41:45 +02:00
										 |  |  |     QStringList debuggingHelperLibraryLocations() const; | 
					
						
							| 
									
										
										
										
											2009-05-28 18:15:02 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-25 15:18:37 +01:00
										 |  |  |     // Builds a debugging library
 | 
					
						
							|  |  |  |     // returns the output of the commands
 | 
					
						
							|  |  |  |     QString buildDebuggingHelperLibrary(); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-28 18:15:02 +02:00
										 |  |  |     bool hasExamples() const; | 
					
						
							|  |  |  |     QString examplesPath() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool hasDocumentation() const; | 
					
						
							|  |  |  |     QString documentationPath() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool hasDemos() const; | 
					
						
							|  |  |  |     QString demosPath() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-08 15:50:06 +01:00
										 |  |  |     // All valid Ids are >= 0
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     int uniqueId() const; | 
					
						
							| 
									
										
										
										
											2009-07-14 15:28:07 +02:00
										 |  |  |     bool isQt64Bit() const; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     enum QmakeBuildConfig | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         NoBuild = 1, | 
					
						
							|  |  |  |         DebugBuild = 2, | 
					
						
							|  |  |  |         BuildAll = 8 | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-13 13:44:13 +02:00
										 |  |  |     Q_DECLARE_FLAGS(QmakeBuildConfigs, QmakeBuildConfig) | 
					
						
							| 
									
										
										
										
											2009-10-27 18:05:04 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-13 13:44:13 +02:00
										 |  |  |     QmakeBuildConfigs defaultBuildConfig() const; | 
					
						
							| 
									
										
										
										
											2009-10-27 18:05:04 +01:00
										 |  |  |     QString toHtml() const; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2009-10-22 17:09:28 +02:00
										 |  |  |     QList<QSharedPointer<ProjectExplorer::ToolChain> > toolChains() const; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     static int getUniqueId(); | 
					
						
							| 
									
										
										
										
											2009-04-23 13:48:05 +02:00
										 |  |  |     // Also used by QtOptionsPageWidget
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     void updateSourcePath(); | 
					
						
							| 
									
										
										
										
											2009-05-25 16:43:50 +02:00
										 |  |  |     void updateVersionInfo() const; | 
					
						
							| 
									
										
										
										
											2009-05-19 14:54:52 +02:00
										 |  |  |     QString findQtBinary(const QStringList &possibleName) const; | 
					
						
							| 
									
										
										
										
											2009-11-09 18:59:11 +01:00
										 |  |  |     void updateToolChainAndMkspec() const; | 
					
						
							| 
									
										
										
										
											2010-01-07 18:17:24 +01:00
										 |  |  |     QString m_displayName; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     QString m_sourcePath; | 
					
						
							|  |  |  |     QString m_mingwDirectory; | 
					
						
							|  |  |  |     QString m_msvcVersion; | 
					
						
							|  |  |  |     int m_id; | 
					
						
							| 
									
										
										
										
											2009-05-28 11:31:35 +02:00
										 |  |  |     bool m_isAutodetected; | 
					
						
							| 
									
										
										
										
											2009-05-28 11:48:33 +02:00
										 |  |  |     QString m_autodetectionSource; | 
					
						
							| 
									
										
										
										
											2009-05-25 16:43:50 +02:00
										 |  |  |     bool m_hasDebuggingHelper; | 
					
						
							| 
									
										
										
										
											2009-11-04 19:14:17 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-04 10:50:44 +02:00
										 |  |  |     QString m_mwcDirectory; | 
					
						
							| 
									
										
										
										
											2009-10-27 17:59:53 +01:00
										 |  |  |     QString m_s60SDKDirectory; | 
					
						
							| 
									
										
										
										
											2009-10-29 12:19:56 +01:00
										 |  |  |     QString m_gcceDirectory; | 
					
						
							| 
									
										
										
										
											2009-05-25 16:43:50 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-09 18:59:11 +01:00
										 |  |  |     mutable bool m_toolChainUpToDate; | 
					
						
							| 
									
										
										
										
											2009-05-25 16:43:50 +02:00
										 |  |  |     mutable QString m_mkspec; // updated lazily
 | 
					
						
							|  |  |  |     mutable QString m_mkspecFullPath; | 
					
						
							| 
									
										
										
										
											2009-10-22 17:09:28 +02:00
										 |  |  |     mutable QList<QSharedPointer<ProjectExplorer::ToolChain> > m_toolChains; | 
					
						
							| 
									
										
										
										
											2009-10-22 14:22:16 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-25 16:43:50 +02:00
										 |  |  |     mutable bool m_versionInfoUpToDate; | 
					
						
							|  |  |  |     mutable QHash<QString,QString> m_versionInfo; // updated lazily
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     mutable bool m_notInstalled; | 
					
						
							|  |  |  |     mutable bool m_defaultConfigIsDebug; | 
					
						
							|  |  |  |     mutable bool m_defaultConfigIsDebugAndRelease; | 
					
						
							| 
									
										
										
										
											2009-05-28 18:15:02 +02:00
										 |  |  |     mutable bool m_hasExamples; | 
					
						
							|  |  |  |     mutable bool m_hasDemos; | 
					
						
							|  |  |  |     mutable bool m_hasDocumentation; | 
					
						
							| 
									
										
										
										
											2009-05-25 16:43:50 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     mutable QString m_qmakeCommand; | 
					
						
							| 
									
										
										
										
											2009-05-25 16:43:50 +02:00
										 |  |  |     mutable QString m_qtVersionString; | 
					
						
							| 
									
										
										
										
											2009-05-12 14:12:20 +02:00
										 |  |  |     mutable QString m_uicCommand; | 
					
						
							| 
									
										
										
										
											2009-05-19 14:54:52 +02:00
										 |  |  |     mutable QString m_designerCommand; | 
					
						
							|  |  |  |     mutable QString m_linguistCommand; | 
					
						
							| 
									
										
										
										
											2010-02-11 18:01:52 +01:00
										 |  |  |     mutable QSet<QString> m_targetIds; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-22 16:52:44 +02:00
										 |  |  | struct QMakeAssignment | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     QString variable; | 
					
						
							|  |  |  |     QString op; | 
					
						
							|  |  |  |     QString value; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-28 12:43:04 +02:00
										 |  |  | class QtVersionManager : public QObject | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | { | 
					
						
							|  |  |  |     Q_OBJECT | 
					
						
							| 
									
										
										
										
											2009-04-23 14:25:47 +02:00
										 |  |  |     // for getUniqueId();
 | 
					
						
							|  |  |  |     friend class QtVersion; | 
					
						
							| 
									
										
										
										
											2009-04-23 16:05:51 +02:00
										 |  |  |     friend class Internal::QtOptionsPage; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2009-04-22 18:05:55 +02:00
										 |  |  |     static QtVersionManager *instance(); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     QtVersionManager(); | 
					
						
							|  |  |  |     ~QtVersionManager(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-08 15:50:06 +01:00
										 |  |  |     // This will *always* return at least one (Qt in Path), even if that is
 | 
					
						
							|  |  |  |     // unconfigured.
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     QList<QtVersion *> versions() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-08 15:50:06 +01:00
										 |  |  |     // Note: DO NOT STORE THIS POINTER!
 | 
					
						
							|  |  |  |     //       The QtVersionManager will delete it at random times and you will
 | 
					
						
							|  |  |  |     //       need to get a new pointer by calling this method again!
 | 
					
						
							| 
									
										
										
										
											2009-04-23 14:25:47 +02:00
										 |  |  |     QtVersion *version(int id) const; | 
					
						
							| 
									
										
										
										
											2010-02-08 15:50:06 +01:00
										 |  |  |     QtVersion *emptyVersion() const; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-03 19:16:22 +02:00
										 |  |  |     QtVersion *qtVersionForQMakeBinary(const QString &qmakePath); | 
					
						
							| 
									
										
										
										
											2010-02-08 15:50:06 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     // Used by the projectloadwizard
 | 
					
						
							|  |  |  |     void addVersion(QtVersion *version); | 
					
						
							| 
									
										
										
										
											2009-05-28 13:22:23 +02:00
										 |  |  |     void removeVersion(QtVersion *version); | 
					
						
							| 
									
										
										
										
											2009-04-22 18:05:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-08 15:50:06 +01:00
										 |  |  |     // Target Support:
 | 
					
						
							|  |  |  |     bool supportsTargetId(const QString &id) const; | 
					
						
							|  |  |  |     // This returns a list of versions that support the target with the given id.
 | 
					
						
							|  |  |  |     // @return A list of QtVersions that supports a target. This list may be empty!
 | 
					
						
							|  |  |  |     QList<QtVersion *> versionsForTargetId(const QString &id) const; | 
					
						
							|  |  |  |     QSet<QString> supportedTargetIds() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-23 14:25:47 +02:00
										 |  |  |     // Static Methods
 | 
					
						
							| 
									
										
										
										
											2009-12-10 17:58:24 +01:00
										 |  |  |     static QPair<QtVersion::QmakeBuildConfigs, QStringList> scanMakeFile(const QString &directory, | 
					
						
							|  |  |  |                                                                          QtVersion::QmakeBuildConfigs defaultBuildConfig); | 
					
						
							| 
									
										
										
										
											2009-09-03 19:16:22 +02:00
										 |  |  |     static QString findQMakeBinaryFromMakefile(const QString &directory); | 
					
						
							| 
									
										
										
										
											2010-01-12 15:46:23 +01:00
										 |  |  |     bool isValidId(int id) const; | 
					
						
							| 
									
										
										
										
											2010-02-08 15:50:06 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | signals: | 
					
						
							| 
									
										
										
										
											2009-12-03 18:37:27 +01:00
										 |  |  |     void qtVersionsChanged(const QList<int> &uniqueIds); | 
					
						
							| 
									
										
										
										
											2009-07-27 13:55:30 +02:00
										 |  |  |     void updateExamples(QString, QString, QString); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private slots: | 
					
						
							|  |  |  |     void updateExamples(); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2009-12-03 18:37:27 +01:00
										 |  |  |     // This function is really simplistic...
 | 
					
						
							|  |  |  |     static bool equals(QtVersion *a, QtVersion *b); | 
					
						
							| 
									
										
										
										
											2009-07-22 16:52:44 +02:00
										 |  |  |     static QString findQMakeLine(const QString &directory); | 
					
						
							|  |  |  |     static QString trimLine(const QString line); | 
					
						
							|  |  |  |     static QStringList splitLine(const QString &line); | 
					
						
							| 
									
										
										
										
											2009-12-10 17:58:24 +01:00
										 |  |  |     static void parseParts(const QStringList &parts, | 
					
						
							|  |  |  |                            QList<QMakeAssignment> *assignments, | 
					
						
							|  |  |  |                            QList<QMakeAssignment> *afterAssignments, | 
					
						
							|  |  |  |                            QStringList *additionalArguments); | 
					
						
							|  |  |  |     static QtVersion::QmakeBuildConfigs qmakeBuildConfigFromCmdArgs(QList<QMakeAssignment> *assignments, | 
					
						
							|  |  |  |                                                                     QtVersion::QmakeBuildConfigs defaultBuildConfig); | 
					
						
							| 
									
										
										
										
											2009-04-23 14:25:47 +02:00
										 |  |  |     // Used by QtOptionsPage
 | 
					
						
							| 
									
										
										
										
											2010-02-08 15:50:06 +01:00
										 |  |  |     void setNewQtVersions(QList<QtVersion *> newVersions); | 
					
						
							| 
									
										
										
										
											2009-04-23 14:25:47 +02:00
										 |  |  |     // Used by QtVersion
 | 
					
						
							|  |  |  |     int getUniqueId(); | 
					
						
							|  |  |  |     void writeVersionsIntoSettings(); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     void addNewVersionsFromInstaller(); | 
					
						
							|  |  |  |     void updateSystemVersion(); | 
					
						
							|  |  |  |     void updateDocumentation(); | 
					
						
							| 
									
										
										
										
											2009-04-23 16:05:51 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     static int indexOfVersionInList(const QtVersion * const version, const QList<QtVersion *> &list); | 
					
						
							|  |  |  |     void updateUniqueIdToIndexMap(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     QtVersion *m_emptyVersion; | 
					
						
							|  |  |  |     QList<QtVersion *> m_versions; | 
					
						
							|  |  |  |     QMap<int, int> m_uniqueIdToIndex; | 
					
						
							|  |  |  |     int m_idcount; | 
					
						
							| 
									
										
										
										
											2009-04-28 12:43:04 +02:00
										 |  |  |     // managed by QtProjectManagerPlugin
 | 
					
						
							|  |  |  |     static QtVersionManager *m_self; | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2009-04-22 18:05:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-28 12:43:04 +02:00
										 |  |  | } // namespace Qt4ProjectManager
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-07 13:53:48 +01:00
										 |  |  | Q_DECLARE_OPERATORS_FOR_FLAGS(Qt4ProjectManager::QtVersion::QmakeBuildConfigs) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 16:19:05 +01:00
										 |  |  | #endif // QTVERSIONMANAGER_H
 |