Moved QrcEditor to Internal namespace, fixed namespace usage.

Change-Id: I24a142318cd6898ce32991085dcbeb7f00507f4e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Konstantin Tokarev
2012-07-20 18:02:21 +04:00
committed by Eike Ziller
parent e0ffb2f6e0
commit 1134c17b55
9 changed files with 26 additions and 22 deletions

View File

@@ -38,6 +38,7 @@
#include <QMessageBox> #include <QMessageBox>
using namespace ResourceEditor; using namespace ResourceEditor;
using namespace ResourceEditor::Internal;
QrcEditor::QrcEditor(QWidget *parent) QrcEditor::QrcEditor(QWidget *parent)
: QWidget(parent), : QWidget(parent),

View File

@@ -37,6 +37,7 @@
#include <QUndoStack> #include <QUndoStack>
namespace ResourceEditor { namespace ResourceEditor {
namespace Internal {
class QrcEditor : public QWidget class QrcEditor : public QWidget
{ {
@@ -105,6 +106,7 @@ private:
QString m_currentLanguage; QString m_currentLanguage;
}; };
} } // namespace Internal
} // namespace ResourceEditor
#endif #endif

View File

@@ -59,7 +59,8 @@ static QString msgFileNameEmpty()
return QCoreApplication::translate("Designer", "The file name is empty."); return QCoreApplication::translate("Designer", "The file name is empty.");
} }
namespace ResourceEditor { using namespace ResourceEditor;
using namespace ResourceEditor::Internal;
/****************************************************************************** /******************************************************************************
** File ** File
@@ -1155,5 +1156,3 @@ QMimeData *ResourceModel::mimeData(const QModelIndexList &indexes) const
rc->setText(doc.toString()); rc->setText(doc.toString());
return rc; return rc;
} }
} // namespace ResourceEditor

View File

@@ -38,6 +38,7 @@
#include <QIcon> #include <QIcon>
namespace ResourceEditor { namespace ResourceEditor {
namespace Internal {
class File; class File;
struct Prefix; struct Prefix;
@@ -274,6 +275,7 @@ private:
QIcon m_prefixIcon; QIcon m_prefixIcon;
}; };
} // namespace SharedTools } // namespace Internal
} // namespace ResourceEditor
#endif // RESOURCEFILE_P_H #endif // RESOURCEFILE_P_H

View File

@@ -48,6 +48,7 @@
#include <QUndoStack> #include <QUndoStack>
namespace ResourceEditor { namespace ResourceEditor {
namespace Internal {
/*! /*!
\class FileEntryBackup \class FileEntryBackup
@@ -99,8 +100,6 @@ void PrefixEntryBackup::restore() const
} }
} }
namespace Internal {
class RelativeResourceModel : public ResourceModel class RelativeResourceModel : public ResourceModel
{ {
public: public:
@@ -184,10 +183,14 @@ EntryBackup * RelativeResourceModel::removeEntry(const QModelIndex &index)
} }
} // namespace Internal } // namespace Internal
} // namespace ResourceEditor
using namespace ResourceEditor;
using namespace ResourceEditor::Internal;
ResourceView::ResourceView(QUndoStack *history, QWidget *parent) : ResourceView::ResourceView(QUndoStack *history, QWidget *parent) :
QTreeView(parent), QTreeView(parent),
m_qrcModel(new Internal::RelativeResourceModel(m_qrcFile, this)), m_qrcModel(new RelativeResourceModel(m_qrcFile, this)),
m_history(history), m_history(history),
m_mergeId(-1) m_mergeId(-1)
{ {
@@ -547,5 +550,3 @@ bool ResourceView::resourceDragEnabled() const
{ {
return m_qrcModel->resourceDragEnabled(); return m_qrcModel->resourceDragEnabled();
} }
} // namespace SharedTools

View File

@@ -44,6 +44,7 @@ class QUndoStack;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace ResourceEditor { namespace ResourceEditor {
namespace Internal {
/*! /*!
\class EntryBackup \class EntryBackup
@@ -65,9 +66,7 @@ public:
virtual ~EntryBackup() { } virtual ~EntryBackup() { }
}; };
namespace Internal { class RelativeResourceModel;
class RelativeResourceModel;
}
class ResourceView : public QTreeView class ResourceView : public QTreeView
{ {
@@ -144,12 +143,13 @@ private:
const QString &before, const QString &after); const QString &before, const QString &after);
ResourceFile m_qrcFile; ResourceFile m_qrcFile;
Internal::RelativeResourceModel *m_qrcModel; RelativeResourceModel *m_qrcModel;
QUndoStack *m_history; QUndoStack *m_history;
int m_mergeId; int m_mergeId;
}; };
} // namespace SharedTools } // namespace Internal
} // namespace ResourceEditor
#endif // RESOURCEVIEW_H #endif // RESOURCEVIEW_H

View File

@@ -32,7 +32,8 @@
#include <QModelIndex> #include <QModelIndex>
namespace ResourceEditor { using namespace ResourceEditor;
using namespace ResourceEditor::Internal;
ViewCommand::ViewCommand(ResourceView *view) ViewCommand::ViewCommand(ResourceView *view)
: m_view(view) : m_view(view)
@@ -183,5 +184,3 @@ void AddEmptyPrefixCommand::undo()
m_prefixArrayIndex, 0, QModelIndex()); m_prefixArrayIndex, 0, QModelIndex());
delete m_view->removeEntry(prefixModelIndex); delete m_view->removeEntry(prefixModelIndex);
} }
} // namespace SharedTools

View File

@@ -41,6 +41,7 @@ class QModelIndex;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace ResourceEditor { namespace ResourceEditor {
namespace Internal {
/*! /*!
\class ViewCommand \class ViewCommand
@@ -157,6 +158,7 @@ private:
void undo(); void undo();
}; };
} // namespace SharedTools } // namespace Internal
} // namespace ResourceEditor
#endif // UNDO_COMMANDS_H #endif // UNDO_COMMANDS_H

View File

@@ -42,13 +42,11 @@ class QToolBar;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace ResourceEditor { namespace ResourceEditor {
class QrcEditor;
namespace Internal { namespace Internal {
class ResourceEditorPlugin; class ResourceEditorPlugin;
class ResourceEditorW; class ResourceEditorW;
class QrcEditor;
class ResourceEditorDocument class ResourceEditorDocument
: public virtual Core::IDocument : public virtual Core::IDocument