2009-02-25 09:15:00 +01:00
|
|
|
/**************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
2012-01-26 18:33:46 +01:00
|
|
|
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2011-11-02 15:59:12 +01:00
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
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
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** 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
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
2011-04-13 08:42:33 +02:00
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Other Usage
|
|
|
|
|
**
|
|
|
|
|
** Alternatively, this file may be used in accordance with the terms and
|
|
|
|
|
** conditions contained in a signed written agreement between you and Nokia.
|
|
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** If you have questions regarding the use of this file, please contact
|
2011-11-02 15:59:12 +01:00
|
|
|
** Nokia at qt-info@nokia.com.
|
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 QT4NODES_H
|
|
|
|
|
#define QT4NODES_H
|
|
|
|
|
|
2011-08-18 16:46:44 +02:00
|
|
|
#include "qt4projectmanager_global.h"
|
2011-01-21 15:37:05 +01:00
|
|
|
|
2011-11-08 18:53:51 +01:00
|
|
|
#include <utils/fileutils.h>
|
2012-02-14 16:43:51 +01:00
|
|
|
#include <coreplugin/idocument.h>
|
2008-12-02 12:01:29 +01:00
|
|
|
#include <projectexplorer/projectnodes.h>
|
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QHash>
|
|
|
|
|
#include <QStringList>
|
|
|
|
|
#include <QDateTime>
|
|
|
|
|
#include <QMap>
|
|
|
|
|
#include <QFutureWatcher>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
// defined in proitems.h
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class ProFile;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
|
class ICore;
|
|
|
|
|
}
|
|
|
|
|
|
2011-05-20 21:40:53 +02:00
|
|
|
namespace QtSupport {
|
|
|
|
|
class ProFileReader;
|
|
|
|
|
}
|
|
|
|
|
|
2011-08-18 16:46:44 +02:00
|
|
|
namespace ProjectExplorer {
|
|
|
|
|
class RunConfiguration;
|
|
|
|
|
class Project;
|
|
|
|
|
}
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2011-08-18 16:46:44 +02:00
|
|
|
namespace Qt4ProjectManager {
|
|
|
|
|
class Qt4BuildConfiguration;
|
2011-05-25 11:23:25 +02:00
|
|
|
class Qt4ProFileNode;
|
2008-12-02 12:01:29 +01:00
|
|
|
class Qt4Project;
|
|
|
|
|
|
|
|
|
|
// Type of projects
|
|
|
|
|
enum Qt4ProjectType {
|
|
|
|
|
InvalidProject = 0,
|
|
|
|
|
ApplicationTemplate,
|
|
|
|
|
LibraryTemplate,
|
|
|
|
|
ScriptTemplate,
|
2011-05-05 17:42:35 +02:00
|
|
|
AuxTemplate,
|
2008-12-02 12:01:29 +01:00
|
|
|
SubDirsTemplate
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Other variables of interest
|
|
|
|
|
enum Qt4Variable {
|
|
|
|
|
DefinesVar = 1,
|
|
|
|
|
IncludePathVar,
|
2012-02-16 15:09:56 +01:00
|
|
|
CppFlagsVar,
|
2012-04-19 12:49:55 +02:00
|
|
|
CppHeaderVar,
|
2012-02-16 15:09:56 +01:00
|
|
|
CppSourceVar,
|
|
|
|
|
ObjCSourceVar,
|
2008-12-02 12:01:29 +01:00
|
|
|
UiDirVar,
|
2009-05-13 18:09:47 +02:00
|
|
|
MocDirVar,
|
2010-01-12 13:13:22 +01:00
|
|
|
PkgConfigVar,
|
2010-03-29 15:17:04 +02:00
|
|
|
PrecompiledHeaderVar,
|
2010-08-16 18:23:30 +02:00
|
|
|
LibDirectoriesVar,
|
2010-09-21 14:28:55 +02:00
|
|
|
ConfigVar,
|
2011-09-15 13:30:54 +02:00
|
|
|
QtVar,
|
2010-10-05 17:38:45 +02:00
|
|
|
QmlImportPathVar,
|
2010-12-14 16:19:44 +01:00
|
|
|
Makefile,
|
2012-04-28 22:24:33 +03:00
|
|
|
SymbianCapabilities,
|
|
|
|
|
ObjectExt,
|
|
|
|
|
ObjectsDir
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
2011-05-25 11:23:25 +02:00
|
|
|
// Import base classes into namespace
|
|
|
|
|
using ProjectExplorer::Node;
|
|
|
|
|
using ProjectExplorer::FileNode;
|
|
|
|
|
using ProjectExplorer::FolderNode;
|
|
|
|
|
using ProjectExplorer::ProjectNode;
|
|
|
|
|
using ProjectExplorer::NodesWatcher;
|
2010-01-20 14:47:08 +01:00
|
|
|
|
2011-05-25 11:23:25 +02:00
|
|
|
// Import enums into namespace
|
|
|
|
|
using ProjectExplorer::NodeType;
|
|
|
|
|
using ProjectExplorer::FileNodeType;
|
|
|
|
|
using ProjectExplorer::FolderNodeType;
|
|
|
|
|
using ProjectExplorer::ProjectNodeType;
|
2010-01-20 14:47:08 +01:00
|
|
|
|
2011-05-25 11:23:25 +02:00
|
|
|
using ProjectExplorer::UnknownFileType;
|
|
|
|
|
using ProjectExplorer::ProjectFileType;
|
2010-01-20 14:47:08 +01:00
|
|
|
|
2011-05-25 11:23:25 +02:00
|
|
|
using ProjectExplorer::FileType;
|
2010-01-20 14:47:08 +01:00
|
|
|
|
2011-09-07 11:52:04 +02:00
|
|
|
namespace Internal {
|
2011-05-25 11:23:25 +02:00
|
|
|
class Qt4UiCodeModelSupport;
|
|
|
|
|
class Qt4PriFile;
|
2011-09-07 11:52:04 +02:00
|
|
|
struct InternalNode;
|
|
|
|
|
}
|
2010-01-20 14:47:08 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
// Implements ProjectNode for qt4 pro files
|
2011-09-07 11:52:04 +02:00
|
|
|
class QT4PROJECTMANAGER_EXPORT Qt4PriFileNode : public ProjectExplorer::ProjectNode
|
2009-03-19 16:33:44 +01:00
|
|
|
{
|
2008-12-02 12:01:29 +01:00
|
|
|
Q_OBJECT
|
2011-07-13 18:02:35 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
public:
|
2008-12-05 14:29:18 +01:00
|
|
|
Qt4PriFileNode(Qt4Project *project, Qt4ProFileNode* qt4ProFileNode, const QString &filePath);
|
2012-03-13 15:44:59 +01:00
|
|
|
~Qt4PriFileNode();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2011-05-20 21:40:53 +02:00
|
|
|
void update(ProFile *includeFileExact, QtSupport::ProFileReader *readerExact, ProFile *includeFileCumlative, QtSupport::ProFileReader *readerCumalative);
|
2010-03-10 16:55:37 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
// ProjectNode interface
|
2010-05-11 14:13:38 +02:00
|
|
|
QList<ProjectAction> supportedActions(Node *node) const;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-02-02 11:59:24 +01:00
|
|
|
bool hasBuildTargets() const { return false; }
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-08-26 18:33:16 +02:00
|
|
|
bool canAddSubProject(const QString &proFilePath) const;
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
bool addSubProjects(const QStringList &proFilePaths);
|
|
|
|
|
bool removeSubProjects(const QStringList &proFilePaths);
|
|
|
|
|
|
|
|
|
|
bool addFiles(const FileType fileType, const QStringList &filePaths,
|
|
|
|
|
QStringList *notAdded = 0);
|
|
|
|
|
bool removeFiles(const FileType fileType, const QStringList &filePaths,
|
|
|
|
|
QStringList *notRemoved = 0);
|
2010-08-10 16:27:35 +02:00
|
|
|
bool deleteFiles(const FileType fileType,
|
|
|
|
|
const QStringList &filePaths);
|
2008-12-02 12:01:29 +01:00
|
|
|
bool renameFile(const FileType fileType,
|
|
|
|
|
const QString &filePath, const QString &newFilePath);
|
|
|
|
|
|
2010-10-13 15:22:52 +02:00
|
|
|
void folderChanged(const QString &changedFolder);
|
2010-08-10 16:27:35 +02:00
|
|
|
|
2010-08-24 17:17:11 +02:00
|
|
|
bool deploysFolder(const QString &folder) const;
|
2011-01-20 18:05:58 +01:00
|
|
|
QList<ProjectExplorer::RunConfiguration *> runConfigurationsFor(Node *node);
|
2010-08-24 17:17:11 +02:00
|
|
|
|
2011-09-06 17:21:51 +02:00
|
|
|
QList<Qt4PriFileNode*> subProjectNodesExact() const;
|
|
|
|
|
|
|
|
|
|
// Set by parent
|
|
|
|
|
bool includedInExactParse() const;
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
protected:
|
2011-09-06 17:21:51 +02:00
|
|
|
void setIncludedInExactParse(bool b);
|
2008-12-02 12:01:29 +01:00
|
|
|
static QStringList varNames(FileType type);
|
2011-05-20 21:40:53 +02:00
|
|
|
static QStringList dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative);
|
2011-11-08 18:53:51 +01:00
|
|
|
static QSet<Utils::FileName> filterFilesProVariables(ProjectExplorer::FileType fileType, const QSet<Utils::FileName> &files);
|
|
|
|
|
static QSet<Utils::FileName> filterFilesRecursiveEnumerata(ProjectExplorer::FileType fileType, const QSet<Utils::FileName> &files);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
enum ChangeType {
|
|
|
|
|
AddToProFile,
|
|
|
|
|
RemoveFromProFile
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void changeFiles(const FileType fileType,
|
|
|
|
|
const QStringList &filePaths,
|
|
|
|
|
QStringList *notChanged,
|
|
|
|
|
ChangeType change);
|
2008-12-05 14:29:18 +01:00
|
|
|
|
2008-12-09 17:17:12 +01:00
|
|
|
private slots:
|
|
|
|
|
void scheduleUpdate();
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
private:
|
2010-01-14 22:58:55 +01:00
|
|
|
void save(const QStringList &lines);
|
2008-12-02 12:01:29 +01:00
|
|
|
bool priFileWritable(const QString &path);
|
2010-01-22 16:49:57 +01:00
|
|
|
bool saveModifiedEditors();
|
2010-06-08 12:15:43 +02:00
|
|
|
QStringList formResources(const QString &formFile) const;
|
2011-05-20 21:40:53 +02:00
|
|
|
QStringList baseVPaths(QtSupport::ProFileReader *reader, const QString &projectDir);
|
|
|
|
|
QStringList fullVPaths(const QStringList &baseVPaths, QtSupport::ProFileReader *reader, FileType type, const QString &qmakeVariable, const QString &projectDir);
|
2010-08-10 16:27:35 +02:00
|
|
|
void watchFolders(const QSet<QString> &folders);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
Qt4Project *m_project;
|
2008-12-05 14:29:18 +01:00
|
|
|
Qt4ProFileNode *m_qt4ProFileNode;
|
2008-12-02 12:01:29 +01:00
|
|
|
QString m_projectFilePath;
|
|
|
|
|
QString m_projectDir;
|
2008-12-09 17:17:12 +01:00
|
|
|
|
2011-09-07 11:52:04 +02:00
|
|
|
QMap<QString, Internal::Qt4UiCodeModelSupport *> m_uiCodeModelSupport;
|
2011-05-25 11:23:25 +02:00
|
|
|
Internal::Qt4PriFile *m_qt4PriFile;
|
2009-05-12 14:12:20 +02:00
|
|
|
|
2010-08-10 16:27:35 +02:00
|
|
|
// Memory is cheap...
|
2011-11-08 18:53:51 +01:00
|
|
|
QMap<ProjectExplorer::FileType, QSet<Utils::FileName> > m_files;
|
|
|
|
|
QSet<Utils::FileName> m_recursiveEnumerateFiles;
|
2010-08-10 16:27:35 +02:00
|
|
|
QSet<QString> m_watchedFolders;
|
2011-09-06 17:21:51 +02:00
|
|
|
bool m_includedInExactParse;
|
2010-08-10 16:27:35 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
// managed by Qt4ProFileNode
|
2011-05-25 11:23:25 +02:00
|
|
|
friend class Qt4ProjectManager::Qt4ProFileNode;
|
2011-09-07 11:52:04 +02:00
|
|
|
friend class Internal::Qt4PriFile; // for scheduling updates on modified
|
2009-08-17 17:59:57 +02:00
|
|
|
// internal temporary subtree representation
|
2011-09-07 11:52:04 +02:00
|
|
|
friend struct Internal::InternalNode;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
2011-09-07 11:52:04 +02:00
|
|
|
namespace Internal {
|
2012-02-14 16:43:51 +01:00
|
|
|
class Qt4PriFile : public Core::IDocument
|
2011-05-25 11:23:25 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
Qt4PriFile(Qt4PriFileNode *qt4PriFile);
|
|
|
|
|
virtual bool save(QString *errorString, const QString &fileName, bool autoSave);
|
|
|
|
|
virtual QString fileName() const;
|
|
|
|
|
virtual void rename(const QString &newName);
|
|
|
|
|
|
|
|
|
|
virtual QString defaultPath() const;
|
|
|
|
|
virtual QString suggestedFileName() const;
|
|
|
|
|
virtual QString mimeType() const;
|
|
|
|
|
|
|
|
|
|
virtual bool isModified() const;
|
|
|
|
|
virtual bool isSaveAsAllowed() const;
|
|
|
|
|
|
|
|
|
|
ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const;
|
|
|
|
|
bool reload(QString *errorString, ReloadFlag flag, ChangeType type);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Qt4PriFileNode *m_priFile;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class Qt4NodesWatcher : public ProjectExplorer::NodesWatcher
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2011-07-13 18:02:35 +02:00
|
|
|
|
2011-05-25 11:23:25 +02:00
|
|
|
public:
|
|
|
|
|
Qt4NodesWatcher(QObject *parent = 0);
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
void projectTypeChanged(Qt4ProjectManager::Qt4ProFileNode *projectNode,
|
|
|
|
|
const Qt4ProjectManager::Qt4ProjectType oldType,
|
|
|
|
|
const Qt4ProjectManager::Qt4ProjectType newType);
|
|
|
|
|
|
|
|
|
|
void variablesChanged(Qt4ProFileNode *projectNode,
|
|
|
|
|
const QHash<Qt4Variable, QStringList> &oldValues,
|
|
|
|
|
const QHash<Qt4Variable, QStringList> &newValues);
|
|
|
|
|
|
2011-06-10 15:37:10 +02:00
|
|
|
void proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *projectNode, bool success, bool parseInProgress);
|
2011-05-25 11:23:25 +02:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
// let them emit signals
|
|
|
|
|
friend class Qt4ProjectManager::Qt4ProFileNode;
|
|
|
|
|
friend class Qt4PriFileNode;
|
|
|
|
|
};
|
|
|
|
|
|
2012-05-04 11:49:37 +02:00
|
|
|
class ProVirtualFolderNode : public ProjectExplorer::VirtualFolderNode
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
explicit ProVirtualFolderNode(const QString &folderPath, int priority, const QString &typeName)
|
|
|
|
|
: VirtualFolderNode(folderPath, priority), m_typeName(typeName)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString displayName() const
|
|
|
|
|
{
|
|
|
|
|
return m_typeName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString tooltip() const
|
|
|
|
|
{
|
|
|
|
|
return QString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QString m_typeName;
|
|
|
|
|
};
|
|
|
|
|
|
2011-05-25 11:23:25 +02:00
|
|
|
} // namespace Internal
|
|
|
|
|
|
|
|
|
|
struct QT4PROJECTMANAGER_EXPORT TargetInformation
|
2010-03-10 16:55:37 +01:00
|
|
|
{
|
|
|
|
|
bool valid;
|
|
|
|
|
QString workingDir;
|
|
|
|
|
QString target;
|
|
|
|
|
QString executable;
|
2010-05-07 10:41:34 +02:00
|
|
|
QString buildDir;
|
2010-03-10 16:55:37 +01:00
|
|
|
bool operator==(const TargetInformation &other) const
|
|
|
|
|
{
|
|
|
|
|
return workingDir == other.workingDir
|
|
|
|
|
&& target == other.target
|
|
|
|
|
&& executable == other.executable
|
2011-05-27 14:57:03 +03:00
|
|
|
&& valid == other.valid
|
|
|
|
|
&& buildDir == other.buildDir;
|
2010-03-10 16:55:37 +01:00
|
|
|
}
|
|
|
|
|
bool operator!=(const TargetInformation &other) const
|
|
|
|
|
{
|
|
|
|
|
return !(*this == other);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TargetInformation()
|
|
|
|
|
: valid(false)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
TargetInformation(const TargetInformation &other)
|
|
|
|
|
: valid(other.valid),
|
|
|
|
|
workingDir(other.workingDir),
|
|
|
|
|
target(other.target),
|
2010-05-07 10:41:34 +02:00
|
|
|
executable(other.executable),
|
|
|
|
|
buildDir(other.buildDir)
|
2010-03-10 16:55:37 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
2011-05-25 11:23:25 +02:00
|
|
|
struct QT4PROJECTMANAGER_EXPORT InstallsItem {
|
2010-10-27 17:19:52 +02:00
|
|
|
InstallsItem(QString p, QStringList f) : path(p), files(f) {}
|
|
|
|
|
QString path;
|
|
|
|
|
QStringList files;
|
|
|
|
|
};
|
|
|
|
|
|
2011-05-25 11:23:25 +02:00
|
|
|
struct QT4PROJECTMANAGER_EXPORT InstallsList {
|
2010-10-27 17:19:52 +02:00
|
|
|
void clear() { targetPath.clear(); items.clear(); }
|
|
|
|
|
QString targetPath;
|
|
|
|
|
QList<InstallsItem> items;
|
|
|
|
|
};
|
|
|
|
|
|
2011-05-25 11:23:25 +02:00
|
|
|
struct QT4PROJECTMANAGER_EXPORT ProjectVersion {
|
2011-05-13 13:23:38 +02:00
|
|
|
int major;
|
|
|
|
|
int minor;
|
|
|
|
|
int patch;
|
|
|
|
|
};
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
// Implements ProjectNode for qt4 pro files
|
2011-09-07 11:52:04 +02:00
|
|
|
class QT4PROJECTMANAGER_EXPORT Qt4ProFileNode : public Qt4PriFileNode
|
2009-03-19 16:33:44 +01:00
|
|
|
{
|
2008-12-02 12:01:29 +01:00
|
|
|
Q_OBJECT
|
2011-07-13 18:02:35 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
public:
|
|
|
|
|
Qt4ProFileNode(Qt4Project *project,
|
|
|
|
|
const QString &filePath,
|
|
|
|
|
QObject *parent = 0);
|
2008-12-02 18:14:06 +01:00
|
|
|
~Qt4ProFileNode();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-03-10 16:55:37 +01:00
|
|
|
bool isParent(Qt4ProFileNode *node);
|
|
|
|
|
|
2010-02-02 11:59:24 +01:00
|
|
|
bool hasBuildTargets() const;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
Qt4ProjectType projectType() const;
|
|
|
|
|
|
|
|
|
|
QStringList variableValue(const Qt4Variable var) const;
|
|
|
|
|
|
2012-06-01 09:50:32 +02:00
|
|
|
bool isSubProjectDeployable(const QString &filePath) const {
|
|
|
|
|
return !m_subProjectsNotToDeploy.contains(filePath);
|
|
|
|
|
}
|
|
|
|
|
|
2009-05-12 14:12:20 +02:00
|
|
|
void updateCodeModelSupportFromBuild(const QStringList &files);
|
2010-02-26 14:55:25 +01:00
|
|
|
void updateCodeModelSupportFromEditor(const QString &uiFileName, const QString &contents);
|
2009-12-03 16:23:15 +01:00
|
|
|
|
2011-01-21 15:37:05 +01:00
|
|
|
QString buildDir(Qt4BuildConfiguration *bc = 0) const;
|
2009-12-04 19:22:12 +01:00
|
|
|
|
2009-12-03 16:23:15 +01:00
|
|
|
QString uiDirectory() const;
|
|
|
|
|
static QString uiHeaderFile(const QString &uiDir, const QString &formFile);
|
|
|
|
|
|
2010-07-06 14:32:33 +02:00
|
|
|
const Qt4ProFileNode *findProFileFor(const QString &string) const;
|
|
|
|
|
TargetInformation targetInformation(const QString &fileName) const;
|
|
|
|
|
TargetInformation targetInformation() const;
|
2009-12-04 19:22:12 +01:00
|
|
|
|
2010-10-27 17:19:52 +02:00
|
|
|
InstallsList installsList() const;
|
2011-05-13 13:23:38 +02:00
|
|
|
ProjectVersion projectVersion() const { return m_projectVersion; }
|
2010-10-27 17:19:52 +02:00
|
|
|
|
2010-10-05 17:38:45 +02:00
|
|
|
QString makefile() const;
|
2010-12-14 16:19:44 +01:00
|
|
|
QStringList symbianCapabilities() const;
|
2012-04-28 22:24:33 +03:00
|
|
|
QString objectExtension() const;
|
|
|
|
|
QString objectsDirectory() const;
|
2012-02-16 15:09:56 +01:00
|
|
|
QByteArray cxxDefines() const;
|
2011-05-10 16:18:04 +02:00
|
|
|
bool isDeployable() const;
|
2011-10-07 15:40:38 +02:00
|
|
|
QString resolvedMkspecPath() const;
|
2010-10-05 17:38:45 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
void update();
|
2010-03-10 16:55:37 +01:00
|
|
|
void scheduleUpdate();
|
|
|
|
|
|
2010-10-27 16:27:22 +02:00
|
|
|
bool validParse() const;
|
2011-06-10 15:37:10 +02:00
|
|
|
bool parseInProgress() const;
|
2010-10-27 16:27:22 +02:00
|
|
|
|
2010-11-18 17:31:30 +01:00
|
|
|
bool hasBuildTargets(Qt4ProjectType projectType) const;
|
2012-05-04 16:25:41 +03:00
|
|
|
bool isDebugAndRelease() const;
|
2011-01-20 18:05:58 +01:00
|
|
|
|
2011-09-12 12:40:53 +02:00
|
|
|
void setParseInProgress(bool b);
|
|
|
|
|
void setParseInProgressRecursive(bool b);
|
2012-05-08 12:53:24 +02:00
|
|
|
void setValidParse(bool b);
|
|
|
|
|
void setValidParseRecursive(bool b);
|
2011-09-12 12:40:53 +02:00
|
|
|
void emitProFileUpdatedRecursive();
|
2010-03-10 16:55:37 +01:00
|
|
|
public slots:
|
|
|
|
|
void asyncUpdate();
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
private slots:
|
2009-01-14 17:13:17 +01:00
|
|
|
void buildStateChanged(ProjectExplorer::Project*);
|
2010-03-10 16:55:37 +01:00
|
|
|
void applyAsyncEvaluate();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2008-12-09 17:17:12 +01:00
|
|
|
private:
|
2010-03-10 16:55:37 +01:00
|
|
|
void setupReader();
|
2011-02-09 20:03:04 +01:00
|
|
|
enum EvalResult { EvalFail, EvalPartial, EvalOk };
|
|
|
|
|
EvalResult evaluate();
|
|
|
|
|
void applyEvaluate(EvalResult parseResult, bool async);
|
2010-03-10 16:55:37 +01:00
|
|
|
|
2011-02-09 20:03:04 +01:00
|
|
|
void asyncEvaluate(QFutureInterface<EvalResult> &fi);
|
2010-03-10 16:55:37 +01:00
|
|
|
|
2009-12-03 16:23:15 +01:00
|
|
|
typedef QHash<Qt4Variable, QStringList> Qt4VariablesHash;
|
|
|
|
|
|
2009-05-12 14:12:20 +02:00
|
|
|
void createUiCodeModelSupport();
|
|
|
|
|
QStringList updateUiFiles();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2012-04-19 13:43:51 +02:00
|
|
|
QStringList fileListForVar(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative,
|
|
|
|
|
const QString &varName, const QString &projectDir) const;
|
2011-05-20 21:40:53 +02:00
|
|
|
QString uiDirPath(QtSupport::ProFileReader *reader) const;
|
|
|
|
|
QString mocDirPath(QtSupport::ProFileReader *reader) const;
|
|
|
|
|
QStringList includePaths(QtSupport::ProFileReader *reader) const;
|
|
|
|
|
QStringList libDirectories(QtSupport::ProFileReader *reader) const;
|
2012-06-01 09:50:32 +02:00
|
|
|
QStringList subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy = 0) const;
|
|
|
|
|
|
2011-05-20 21:40:53 +02:00
|
|
|
TargetInformation targetInformation(QtSupport::ProFileReader *reader) const;
|
|
|
|
|
void setupInstallsList(const QtSupport::ProFileReader *reader);
|
|
|
|
|
void setupProjectVersion(const QtSupport::ProFileReader *reader);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
Qt4ProjectType m_projectType;
|
2009-12-03 16:23:15 +01:00
|
|
|
Qt4VariablesHash m_varValues;
|
2011-05-10 16:18:04 +02:00
|
|
|
bool m_isDeployable;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2009-01-14 17:13:17 +01:00
|
|
|
QMap<QString, QDateTime> m_uitimestamps;
|
2010-03-10 16:55:37 +01:00
|
|
|
TargetInformation m_qt4targetInformation;
|
2011-10-07 15:40:38 +02:00
|
|
|
QString m_resolvedMkspecPath;
|
2012-06-01 09:50:32 +02:00
|
|
|
QStringList m_subProjectsNotToDeploy;
|
2010-10-27 17:19:52 +02:00
|
|
|
InstallsList m_installsList;
|
2011-05-13 13:23:38 +02:00
|
|
|
ProjectVersion m_projectVersion;
|
2008-12-02 12:01:29 +01:00
|
|
|
friend class Qt4NodeHierarchy;
|
2010-03-10 16:55:37 +01:00
|
|
|
|
2010-10-27 16:27:22 +02:00
|
|
|
bool m_validParse;
|
2011-06-10 15:37:10 +02:00
|
|
|
bool m_parseInProgress;
|
2010-10-27 16:27:22 +02:00
|
|
|
|
2010-03-10 16:55:37 +01:00
|
|
|
// Async stuff
|
2011-02-09 20:03:04 +01:00
|
|
|
QFutureWatcher<EvalResult> m_parseFutureWatcher;
|
2011-05-20 21:40:53 +02:00
|
|
|
QtSupport::ProFileReader *m_readerExact;
|
|
|
|
|
QtSupport::ProFileReader *m_readerCumulative;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Qt4ProjectManager
|
|
|
|
|
|
|
|
|
|
#endif // QT4NODES_H
|