From cad296649809da562d91f0296b04bd2c6c3269ab Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 7 May 2012 18:28:03 +0200 Subject: use Core::Id for IMode::id and IMode::type Change-Id: Ic7ce5b883e054c6eeba078327042e99e1c556345 Reviewed-by: Eike Ziller --- src/plugins/qmljseditor/qmljseditoreditable.cpp | 8 ++++---- src/plugins/qmljseditor/qmljseditoreditable.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/plugins/qmljseditor') 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(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); }; -- cgit v1.2.1