Commit c083bded authored by Daniel Teske's avatar Daniel Teske
Browse files

Export Qt4PriFileNode

Change-Id: I4e6dd89a8ddd95aa21ebf5555c05349f541bd83e
Reviewed-on: http://codereview.qt.nokia.com/4335

Reviewed-by: default avatarChristian Kandeler <christian.kandeler@nokia.com>
Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
parent 6b1bc495
......@@ -64,9 +64,9 @@ namespace Qt4ProjectManager {
class Qt4Project;
class Qt4BaseTarget;
class Qt4ProFileNode;
class Qt4PriFileNode;
namespace Internal {
class Qt4PriFileNode;
class Qt4RunConfigurationFactory;
class Qt4RunConfiguration : public ProjectExplorer::LocalApplicationRunConfiguration
......
......@@ -88,22 +88,22 @@ struct FileTypeDataStorage {
static const FileTypeDataStorage fileTypeDataStorage[] = {
{ ProjectExplorer::HeaderType,
QT_TRANSLATE_NOOP("Qt4ProjectManager::Internal::Qt4PriFileNode", "Headers"),
QT_TRANSLATE_NOOP("Qt4ProjectManager::Qt4PriFileNode", "Headers"),
":/qt4projectmanager/images/headers.png" },
{ ProjectExplorer::SourceType,
QT_TRANSLATE_NOOP("Qt4ProjectManager::Internal::Qt4PriFileNode", "Sources"),
QT_TRANSLATE_NOOP("Qt4ProjectManager::Qt4PriFileNode", "Sources"),
":/qt4projectmanager/images/sources.png" },
{ ProjectExplorer::FormType,
QT_TRANSLATE_NOOP("Qt4ProjectManager::Internal::Qt4PriFileNode", "Forms"),
QT_TRANSLATE_NOOP("Qt4ProjectManager::Qt4PriFileNode", "Forms"),
":/qt4projectmanager/images/forms.png" },
{ ProjectExplorer::ResourceType,
QT_TRANSLATE_NOOP("Qt4ProjectManager::Internal::Qt4PriFileNode", "Resources"),
QT_TRANSLATE_NOOP("Qt4ProjectManager::Qt4PriFileNode", "Resources"),
":/qt4projectmanager/images/qt_qrc.png" },
{ ProjectExplorer::QMLType,
QT_TRANSLATE_NOOP("Qt4ProjectManager::Internal::Qt4PriFileNode", "QML"),
QT_TRANSLATE_NOOP("Qt4ProjectManager::Qt4PriFileNode", "QML"),
":/qt4projectmanager/images/qml.ico" }, // TODO icon
{ ProjectExplorer::UnknownFileType,
QT_TRANSLATE_NOOP("Qt4ProjectManager::Internal::Qt4PriFileNode", "Other files"),
QT_TRANSLATE_NOOP("Qt4ProjectManager::Qt4PriFileNode", "Other files"),
":/qt4projectmanager/images/unknown.png" }
};
......@@ -140,7 +140,7 @@ Q_GLOBAL_STATIC_WITH_INITIALIZER(Qt4NodeStaticData, qt4NodeStaticData, {
overlayIcon, desiredSize);
QIcon folderIcon;
folderIcon.addPixmap(folderPixmap);
const QString desc = Qt4ProjectManager::Internal::Qt4PriFileNode::tr(fileTypeDataStorage[i].typeName);
const QString desc = Qt4ProjectManager::Qt4PriFileNode::tr(fileTypeDataStorage[i].typeName);
x->fileTypeData.push_back(Qt4NodeStaticData::FileTypeData(fileTypeDataStorage[i].type,
desc, folderIcon));
}
......@@ -162,8 +162,8 @@ static void clearQt4NodeStaticData()
enum { debug = 0 };
namespace Qt4ProjectManager {
namespace Internal {
using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal;
Qt4PriFile::Qt4PriFile(Qt4PriFileNode *qt4PriFile)
: IFile(qt4PriFile), m_priFile(qt4PriFile)
......@@ -266,6 +266,8 @@ void Qt4PriFileNode::scheduleUpdate()
m_qt4ProFileNode->scheduleUpdate();
}
namespace Qt4ProjectManager {
namespace Internal {
struct InternalNode
{
QMap<QString, InternalNode*> subnodes;
......@@ -482,7 +484,8 @@ struct InternalNode
projectNode->addFileNodes(filesToAdd, folder);
}
};
}
}
QStringList Qt4PriFileNode::baseVPaths(QtSupport::ProFileReader *reader, const QString &projectDir)
{
......@@ -1331,9 +1334,6 @@ Qt4NodesWatcher::Qt4NodesWatcher(QObject *parent)
{
}
} // namespace Internal
const Qt4ProFileNode *Qt4ProFileNode::findProFileFor(const QString &fileName) const
{
if (fileName == path())
......@@ -1609,7 +1609,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
if (debug)
qDebug() << "Qt4ProFileNode - updating files for file " << m_projectFilePath;
Qt4ProjectType projectType = Internal::proFileTemplateTypeToProjectType(
Qt4ProjectType projectType = proFileTemplateTypeToProjectType(
(evalResult == EvalOk ? m_readerExact : m_readerCumulative)->templateType());
if (projectType != m_projectType) {
Qt4ProjectType oldType = m_projectType;
......@@ -1885,7 +1885,7 @@ QStringList Qt4ProFileNode::updateUiFiles()
return QStringList();
// Find all ui files
Internal::FindUiFileNodesVisitor uiFilesVisitor;
FindUiFileNodesVisitor uiFilesVisitor;
this->accept(&uiFilesVisitor);
const QList<ProjectExplorer::FileNode*> uiFiles = uiFilesVisitor.uiFileNodes;
......@@ -2329,7 +2329,7 @@ void Qt4ProFileNode::createUiCodeModelSupport()
// Only those two project types can have ui files for us
if (m_projectType == ApplicationTemplate || m_projectType == LibraryTemplate) {
// Find all ui files
Internal::FindUiFileNodesVisitor uiFilesVisitor;
FindUiFileNodesVisitor uiFilesVisitor;
this->accept(&uiFilesVisitor);
const QList<ProjectExplorer::FileNode*> uiFiles = uiFilesVisitor.uiFileNodes;
......@@ -2361,5 +2361,3 @@ void Qt4ProFileNode::createUiCodeModelSupport()
delete it.value();
}
}
} // namespace Qt4ProjectManager
......@@ -92,8 +92,6 @@ enum Qt4Variable {
SymbianCapabilities
};
namespace Internal {
// Import base classes into namespace
using ProjectExplorer::Node;
using ProjectExplorer::FileNode;
......@@ -112,12 +110,15 @@ using ProjectExplorer::ProjectFileType;
using ProjectExplorer::FileType;
namespace Internal {
class Qt4UiCodeModelSupport;
class ProFileReader;
class Qt4PriFile;
struct InternalNode;
}
// Implements ProjectNode for qt4 pro files
class Qt4PriFileNode : public ProjectExplorer::ProjectNode
class QT4PROJECTMANAGER_EXPORT Qt4PriFileNode : public ProjectExplorer::ProjectNode
{
Q_OBJECT
......@@ -195,7 +196,7 @@ private:
QString m_projectFilePath;
QString m_projectDir;
QMap<QString, Qt4UiCodeModelSupport *> m_uiCodeModelSupport;
QMap<QString, Internal::Qt4UiCodeModelSupport *> m_uiCodeModelSupport;
Internal::Qt4PriFile *m_qt4PriFile;
// Memory is cheap...
......@@ -207,11 +208,12 @@ private:
// managed by Qt4ProFileNode
friend class Qt4ProjectManager::Qt4ProFileNode;
friend class Qt4PriFile; // for scheduling updates on modified
friend class Internal::Qt4PriFile; // for scheduling updates on modified
// internal temporary subtree representation
friend struct InternalNode;
friend struct Internal::InternalNode;
};
namespace Internal {
class Qt4PriFile : public Core::IFile
{
Q_OBJECT
......@@ -316,7 +318,7 @@ struct QT4PROJECTMANAGER_EXPORT ProjectVersion {
};
// Implements ProjectNode for qt4 pro files
class QT4PROJECTMANAGER_EXPORT Qt4ProFileNode : public Internal::Qt4PriFileNode
class QT4PROJECTMANAGER_EXPORT Qt4ProFileNode : public Qt4PriFileNode
{
Q_OBJECT
......
......@@ -54,18 +54,17 @@ class ProFileReader;
namespace Qt4ProjectManager {
class Qt4ProFileNode;
class Qt4PriFileNode;
class Qt4BaseTarget;
class Qt4BuildConfiguration;
namespace Internal {
class DeployHelperRunStep;
class FileItem;
class Qt4PriFileNode;
class GCCPreprocessor;
struct Qt4ProjectFiles;
class Qt4ProjectConfigWidget;
class Qt4ProjectFile;
class Qt4PriFileNode;
class Qt4NodesWatcher;
}
......@@ -133,8 +132,8 @@ public:
// For Qt4ProFileNode after a on disk change
void updateFileList();
void watchFolders(const QStringList &l, Internal::Qt4PriFileNode *node);
void unwatchFolders(const QStringList &l, Internal::Qt4PriFileNode *node);
void watchFolders(const QStringList &l, Qt4PriFileNode *node);
void unwatchFolders(const QStringList &l, Qt4PriFileNode *node);
signals:
void proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *node, bool, bool);
......@@ -167,7 +166,7 @@ private:
static void collectAllfProFiles(QList<Qt4ProFileNode *> &list, Qt4ProFileNode *node);
static void collectApplicationProFiles(QList<Qt4ProFileNode *> &list, Qt4ProFileNode *node);
static void findProFile(const QString& fileName, Qt4ProFileNode *root, QList<Qt4ProFileNode *> &list);
static bool hasSubNode(Internal::Qt4PriFileNode *root, const QString &path);
static bool hasSubNode(Qt4PriFileNode *root, const QString &path);
static bool equalFileList(const QStringList &a, const QStringList &b);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment