summaryrefslogtreecommitdiff
path: root/src/plugins/resourceeditor
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2010-06-25 12:56:16 +0200
committerhjk <qtc-committer@nokia.com>2010-06-25 12:58:07 +0200
commitc7e8b51d37700499536e3ab333190abd127ea0f7 (patch)
treea37b295b137c0049958fb2283b169eec0cdc430c /src/plugins/resourceeditor
parenta54fc1f6a1e2c2fa0a2f741558a95231c08925b4 (diff)
downloadqt-creator-c7e8b51d37700499536e3ab333190abd127ea0f7.tar.gz
core: use a class derived from QList<int> instead of a QList<int> for Core::Context
A mostly mechanical change. Reviewed-By: con
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r--src/plugins/resourceeditor/resourceeditorfactory.h5
-rw-r--r--src/plugins/resourceeditor/resourceeditorplugin.cpp2
-rw-r--r--src/plugins/resourceeditor/resourceeditorw.cpp2
-rw-r--r--src/plugins/resourceeditor/resourceeditorw.h10
4 files changed, 7 insertions, 12 deletions
diff --git a/src/plugins/resourceeditor/resourceeditorfactory.h b/src/plugins/resourceeditor/resourceeditorfactory.h
index 13be080f89..49d9e2c60e 100644
--- a/src/plugins/resourceeditor/resourceeditorfactory.h
+++ b/src/plugins/resourceeditor/resourceeditorfactory.h
@@ -31,6 +31,7 @@
#define RRESOURCEEDITORFACTORY_H
#include <coreplugin/editormanager/ieditorfactory.h>
+#include <coreplugin/icontext.h>
#include <QtCore/QStringList>
@@ -44,8 +45,6 @@ class ResourceEditorFactory : public Core::IEditorFactory
Q_OBJECT
public:
- typedef QList<int> Context;
-
explicit ResourceEditorFactory(ResourceEditorPlugin *plugin);
virtual QStringList mimeTypes() const;
@@ -58,7 +57,7 @@ public:
private:
const QStringList m_mimeTypes;
- Context m_context;
+ Core::Context m_context;
ResourceEditorPlugin *m_plugin;
};
diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp
index 2638df860b..3202328c8f 100644
--- a/src/plugins/resourceeditor/resourceeditorplugin.cpp
+++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp
@@ -90,7 +90,7 @@ bool ResourceEditorPlugin::initialize(const QStringList &arguments, QString *err
Core::ActionManager * const actionManager = core->actionManager();
int const contextId = core->uniqueIDManager()->uniqueIdentifier(
Constants::C_RESOURCEEDITOR);
- const QList<int> context = QList<int>() << contextId;
+ const Core::Context context(contextId);
m_undoAction = new QAction(tr("&Undo"), this);
m_redoAction = new QAction(tr("&Redo"), this);
actionManager->registerAction(m_undoAction, Core::Constants::UNDO, context);
diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp
index 9977bd8660..21af9efc8b 100644
--- a/src/plugins/resourceeditor/resourceeditorw.cpp
+++ b/src/plugins/resourceeditor/resourceeditorw.cpp
@@ -66,7 +66,7 @@ QString ResourceEditorFile::mimeType() const
}
-ResourceEditorW::ResourceEditorW(const QList<int> &context,
+ResourceEditorW::ResourceEditorW(const Core::Context &context,
ResourceEditorPlugin *plugin,
QWidget *parent)
: m_context(context),
diff --git a/src/plugins/resourceeditor/resourceeditorw.h b/src/plugins/resourceeditor/resourceeditorw.h
index 79e11bd3a1..b05f5eee3a 100644
--- a/src/plugins/resourceeditor/resourceeditorw.h
+++ b/src/plugins/resourceeditor/resourceeditorw.h
@@ -51,8 +51,6 @@ class ResourceEditorFile
Q_OBJECT
public:
- typedef QList<int> Context;
-
ResourceEditorFile(ResourceEditorW *parent = 0);
//IFile
@@ -78,9 +76,7 @@ class ResourceEditorW : public Core::IEditor
Q_OBJECT
public:
- typedef QList<int> Context;
-
- ResourceEditorW(const Context &context,
+ ResourceEditorW(const Core::Context &context,
ResourceEditorPlugin *plugin,
QWidget *parent = 0);
~ResourceEditorW();
@@ -99,7 +95,7 @@ public:
bool restoreState(const QByteArray &/*state*/) { return true; }
// ContextInterface
- Context context() const { return m_context; }
+ Core::Context context() const { return m_context; }
QWidget *widget();
void setSuggestedFileName(const QString &fileName);
@@ -114,7 +110,7 @@ private:
const QString m_fileFilter;
QString m_displayName;
QString m_suggestedName;
- const Context m_context;
+ const Core::Context m_context;
QPointer<SharedTools::QrcEditor> m_resourceEditor;
ResourceEditorFile *m_resourceFile;
ResourceEditorPlugin *m_plugin;