summaryrefslogtreecommitdiff
path: root/src/plugins/qmljseditor
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2012-05-07 18:28:03 +0200
committerEike Ziller <eike.ziller@nokia.com>2012-05-08 10:18:12 +0200
commitcad296649809da562d91f0296b04bd2c6c3269ab (patch)
tree0652ce148b95fac58d05153d15323322e80704a7 /src/plugins/qmljseditor
parent2d612a252bb3b9ac2724966fe95d6f64054fd993 (diff)
downloadqt-creator-cad296649809da562d91f0296b04bd2c6c3269ab.tar.gz
use Core::Id for IMode::id and IMode::type
Change-Id: Ic7ce5b883e054c6eeba078327042e99e1c556345 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/plugins/qmljseditor')
-rw-r--r--src/plugins/qmljseditor/qmljseditoreditable.cpp8
-rw-r--r--src/plugins/qmljseditor/qmljseditoreditable.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/qmljseditor/qmljseditoreditable.cpp b/src/plugins/qmljseditor/qmljseditoreditable.cpp
index 7c1306d086..b0de0e5e9d 100644
--- a/src/plugins/qmljseditor/qmljseditoreditable.cpp
+++ b/src/plugins/qmljseditor/qmljseditoreditable.cpp
@@ -63,7 +63,7 @@ static bool openInDesignMode()
// Check if Bauhaus is loaded, that is, a Design mode widget is
// registered for the QML mime type.
if (!bauhausDetected) {
- if (const Core::IMode *dm = Core::ModeManager::mode(QLatin1String(Core::Constants::MODE_DESIGN)))
+ if (const Core::IMode *dm = Core::ModeManager::mode(Core::Constants::MODE_DESIGN))
if (const Core::DesignMode *designMode = qobject_cast<const Core::DesignMode *>(dm))
bauhausPresent = designMode->registeredMimeTypes().contains(QLatin1String(QmlJSTools::Constants::QML_MIMETYPE));
bauhausDetected = true;
@@ -74,7 +74,7 @@ static bool openInDesignMode()
return bool(QmlDesigner::Constants::QML_OPENDESIGNMODE_DEFAULT);
}
-QString QmlJSEditorEditable::preferredModeType() const
+Core::Id QmlJSEditorEditable::preferredModeType() const
{
Core::IMode *mode = Core::ModeManager::currentMode();
if (mode && (mode->type() == Core::Constants::MODE_DESIGN_TYPE
@@ -88,8 +88,8 @@ QString QmlJSEditorEditable::preferredModeType() const
// have the user also access to this failsafe setting.
if (editorWidget()->mimeType() == QLatin1String(QmlJSTools::Constants::QML_MIMETYPE)
&& openInDesignMode())
- return QLatin1String(Core::Constants::MODE_DESIGN_TYPE);
- return QString();
+ return Core::Constants::MODE_DESIGN_TYPE;
+ return Core::Id();
}
void QmlJSEditorEditable::setTextCodec(QTextCodec *codec, TextCodecReason reason)
diff --git a/src/plugins/qmljseditor/qmljseditoreditable.h b/src/plugins/qmljseditor/qmljseditoreditable.h
index ad3717ccf7..389c6ef7b0 100644
--- a/src/plugins/qmljseditor/qmljseditoreditable.h
+++ b/src/plugins/qmljseditor/qmljseditoreditable.h
@@ -51,7 +51,7 @@ public:
Core::Id id() const;
bool isTemporary() const { return false; }
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
- QString preferredModeType() const;
+ Core::Id preferredModeType() const;
void setTextCodec(QTextCodec *codec, TextCodecReason = TextCodecOtherReason);
};