aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <[email protected]>2012-11-27 11:50:56 +0100
committerEike Ziller <[email protected]>2012-11-27 11:50:56 +0100
commitba1d5f2cdf7d31eb862f02bd42885cdba13a7f15 (patch)
tree5c9d0551e67612724a2ca0328636b091653c1f00
parentc384f52b49f0eddc7a7f8e622e1485ebb1018028 (diff)
parentdeeef5308f1b3d59581aa1a65e781d434719a40d (diff)
Merge remote-tracking branch 'origin/2.6'
Conflicts: share/share.qbs src/plugins/cpptools/cppchecksymbols.cpp src/plugins/texteditor/behaviorsettingswidget.cpp Change-Id: Ia34060984f9c036b2f28a6411d796d41f55a3e37
-rw-r--r--doc/src/projects/creator-projects-creating.qdoc20
-rw-r--r--doc/src/qtquick/qtquick-creating.qdoc16
-rw-r--r--share/qtcreator/templates/wizards/qtquick1-extension/lib.png (renamed from share/qtcreator/templates/wizards/qml-extension/lib.png)bin1245 -> 1245 bytes
-rw-r--r--share/qtcreator/templates/wizards/qtquick1-extension/object.cpp (renamed from share/qtcreator/templates/wizards/qml-extension/object.cpp)0
-rw-r--r--share/qtcreator/templates/wizards/qtquick1-extension/object.h (renamed from share/qtcreator/templates/wizards/qml-extension/object.h)0
-rw-r--r--share/qtcreator/templates/wizards/qtquick1-extension/plugin.cpp14
-rw-r--r--share/qtcreator/templates/wizards/qtquick1-extension/plugin.h (renamed from share/qtcreator/templates/wizards/qml-extension/plugin.h)3
-rw-r--r--share/qtcreator/templates/wizards/qtquick1-extension/project.pro (renamed from share/qtcreator/templates/wizards/qml-extension/project.pro)0
-rw-r--r--share/qtcreator/templates/wizards/qtquick1-extension/qmldir (renamed from share/qtcreator/templates/wizards/qml-extension/qmldir)0
-rw-r--r--share/qtcreator/templates/wizards/qtquick1-extension/wizard.xml (renamed from share/qtcreator/templates/wizards/qml-extension/wizard.xml)4
-rw-r--r--share/qtcreator/templates/wizards/qtquick2-extension/lib.pngbin0 -> 1245 bytes
-rw-r--r--share/qtcreator/templates/wizards/qtquick2-extension/object.cpp15
-rw-r--r--share/qtcreator/templates/wizards/qtquick2-extension/object.h18
-rw-r--r--share/qtcreator/templates/wizards/qtquick2-extension/plugin.cpp (renamed from share/qtcreator/templates/wizards/qml-extension/plugin.cpp)3
-rw-r--r--share/qtcreator/templates/wizards/qtquick2-extension/plugin.h15
-rw-r--r--share/qtcreator/templates/wizards/qtquick2-extension/project.pro34
-rw-r--r--share/qtcreator/templates/wizards/qtquick2-extension/qmldir2
-rw-r--r--share/qtcreator/templates/wizards/qtquick2-extension/wizard.xml70
-rw-r--r--share/share.qbs2
-rw-r--r--src/app/main.cpp4
-rw-r--r--src/libs/utils/basetreeview.cpp2
-rw-r--r--src/libs/utils/basetreeview.h2
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp11
-rw-r--r--src/plugins/cpptools/cppchecksymbols.cpp6
-rw-r--r--src/plugins/debugger/debuggerengine.cpp4
-rw-r--r--src/plugins/debugger/debuggerengine.h2
-rw-r--r--src/plugins/debugger/qml/qmlcppengine.cpp8
-rw-r--r--src/plugins/debugger/qml/qmlcppengine.h1
-rw-r--r--src/plugins/debugger/qml/qmlengine.cpp7
-rw-r--r--src/plugins/debugger/qml/qmlengine.h1
-rw-r--r--src/plugins/debugger/qml/qmlinspectoradapter.cpp6
-rw-r--r--src/plugins/debugger/qml/qmlinspectoradapter.h3
-rw-r--r--src/plugins/debugger/qml/qmlinspectoragent.cpp11
-rw-r--r--src/plugins/debugger/qml/qmlinspectoragent.h2
-rw-r--r--src/plugins/debugger/watchwindow.cpp5
-rw-r--r--src/plugins/debugger/watchwindow.h1
-rw-r--r--src/plugins/madde/maemoinstalltosysrootstep.cpp4
-rw-r--r--src/plugins/madde/maemoqemumanager.cpp2
-rw-r--r--src/plugins/qmljseditor/qmljspreviewrunner.cpp2
-rw-r--r--src/plugins/remotelinux/linuxdevicetester.cpp4
-rw-r--r--src/plugins/remotelinux/packageuploader.cpp2
-rw-r--r--src/plugins/texteditor/behaviorsettingswidget.cpp11
-rw-r--r--src/shared/qtsingleapplication/qtsingleapplication.cpp30
-rw-r--r--src/shared/qtsingleapplication/qtsingleapplication.h9
44 files changed, 276 insertions, 80 deletions
diff --git a/doc/src/projects/creator-projects-creating.qdoc b/doc/src/projects/creator-projects-creating.qdoc
index 21b9bd5e609..bbaf9696b71 100644
--- a/doc/src/projects/creator-projects-creating.qdoc
+++ b/doc/src/projects/creator-projects-creating.qdoc
@@ -120,15 +120,15 @@
custom look and feel and QML and C++ code to implement the
application logic
- \o Qt Quick Application for MeeGo Harmattan
+ \o Qt Quick 1 Application for MeeGo Harmattan
Use Qt Quick Components for MeeGo Harmattan to design a user
interface with the platform look and feel
- \o Qt Quick Application (from Existing QML File)
+ \o Qt Quick 1 Application (from Existing QML File)
- Convert existing QML applications to projects that you can run
- in \QC or deploy to mobile devices
+ Convert existing Qt Quick 1 applications to projects that you
+ can run in \QC or deploy to mobile devices
\o Qt Console Application
@@ -158,12 +158,18 @@
Shared or static C++ library based on qmake
- \o Custom QML Extension Plugin
+ \o Qt Quick 1 Extension Plugin
- C++ plugin that makes it possible to offer extensions
- that can be loaded dynamically into applications by using the
+ C++ plugin that makes it possible to offer extensions that can
+ be loaded dynamically into Qt Quick 1 applications by using the
QDeclarativeEngine class
+ \o Qt Quick 2 Extension Plugin
+
+ C++ plugin that makes it possible to offer extensions that can
+ be loaded dynamically into Qt Quick 2 applications by using the
+ QQmlEngine class
+
\o \QC Plugin
diff --git a/doc/src/qtquick/qtquick-creating.qdoc b/doc/src/qtquick/qtquick-creating.qdoc
index a8dcf90f2b7..67ef94eb000 100644
--- a/doc/src/qtquick/qtquick-creating.qdoc
+++ b/doc/src/qtquick/qtquick-creating.qdoc
@@ -64,15 +64,17 @@
need to have the development environment installed on your
computer to create and run this type of project.
- \o \gui {Qt Quick Application (from Existing QML File)} converts
- existing QML applications to Qt Quick application projects. This
- enables you to run them from \QC and to deploy them to mobile
+ \o \gui {Qt Quick 1 Application (from Existing QML File)} converts
+ existing Qt Quick 1 applications to Qt Quick application projects.
+ This enables you to run them from \QC and to deploy them to mobile
devices.
- \o \gui {Custom QML Extension Plugin} (in the \gui Libraries category)
- creates a C++ plugin that makes
- it possible to offer extensions that can be loaded dynamically into
- applications by using the QDeclarativeEngine class.
+ \o \gui {Qt Quick Extension Plugins} (in the \gui Libraries category)
+ create C++ plugins that make it possible to offer extensions that
+ can be loaded dynamically into Qt Quick applications. Select
+ \gui {Qt Quick 1 Extension Plugin} to create extensions for
+ Qt Quick 1 applications and \gui {Qt Quick 2 Extension Plugin} to
+ create extensions for Qt Quick 2 applications.
\endlist
diff --git a/share/qtcreator/templates/wizards/qml-extension/lib.png b/share/qtcreator/templates/wizards/qtquick1-extension/lib.png
index a4e818d986d..a4e818d986d 100644
--- a/share/qtcreator/templates/wizards/qml-extension/lib.png
+++ b/share/qtcreator/templates/wizards/qtquick1-extension/lib.png
Binary files differ
diff --git a/share/qtcreator/templates/wizards/qml-extension/object.cpp b/share/qtcreator/templates/wizards/qtquick1-extension/object.cpp
index b78c7080162..b78c7080162 100644
--- a/share/qtcreator/templates/wizards/qml-extension/object.cpp
+++ b/share/qtcreator/templates/wizards/qtquick1-extension/object.cpp
diff --git a/share/qtcreator/templates/wizards/qml-extension/object.h b/share/qtcreator/templates/wizards/qtquick1-extension/object.h
index 594491e67c0..594491e67c0 100644
--- a/share/qtcreator/templates/wizards/qml-extension/object.h
+++ b/share/qtcreator/templates/wizards/qtquick1-extension/object.h
diff --git a/share/qtcreator/templates/wizards/qtquick1-extension/plugin.cpp b/share/qtcreator/templates/wizards/qtquick1-extension/plugin.cpp
new file mode 100644
index 00000000000..62a9a94de0d
--- /dev/null
+++ b/share/qtcreator/templates/wizards/qtquick1-extension/plugin.cpp
@@ -0,0 +1,14 @@
+#include "%ProjectName:l%_plugin.%CppHeaderSuffix%"
+#include "%ObjectName:l%.%CppHeaderSuffix%"
+
+#include <qdeclarative.h>
+
+void %ProjectName:s%Plugin::registerTypes(const char *uri)
+{
+ // @uri %Uri%
+ qmlRegisterType<%ObjectName%>(uri, 1, 0, "%ObjectName%");
+}
+
+#if QT_VERSION < 0x050000
+ Q_EXPORT_PLUGIN2(%ProjectName:s%, %ProjectName:s%Plugin)
+#endif
diff --git a/share/qtcreator/templates/wizards/qml-extension/plugin.h b/share/qtcreator/templates/wizards/qtquick1-extension/plugin.h
index 8eaa62384a1..d487a8339d5 100644
--- a/share/qtcreator/templates/wizards/qml-extension/plugin.h
+++ b/share/qtcreator/templates/wizards/qtquick1-extension/plugin.h
@@ -6,6 +6,9 @@
class %ProjectName:s%Plugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+#if QT_VERSION >= 0x050000
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
+#endif
public:
void registerTypes(const char *uri);
diff --git a/share/qtcreator/templates/wizards/qml-extension/project.pro b/share/qtcreator/templates/wizards/qtquick1-extension/project.pro
index bf028c6a28b..bf028c6a28b 100644
--- a/share/qtcreator/templates/wizards/qml-extension/project.pro
+++ b/share/qtcreator/templates/wizards/qtquick1-extension/project.pro
diff --git a/share/qtcreator/templates/wizards/qml-extension/qmldir b/share/qtcreator/templates/wizards/qtquick1-extension/qmldir
index ee07ff6b101..ee07ff6b101 100644
--- a/share/qtcreator/templates/wizards/qml-extension/qmldir
+++ b/share/qtcreator/templates/wizards/qtquick1-extension/qmldir
diff --git a/share/qtcreator/templates/wizards/qml-extension/wizard.xml b/share/qtcreator/templates/wizards/qtquick1-extension/wizard.xml
index ed57064dca6..d8fa31f425e 100644
--- a/share/qtcreator/templates/wizards/qml-extension/wizard.xml
+++ b/share/qtcreator/templates/wizards/qtquick1-extension/wizard.xml
@@ -36,11 +36,11 @@ leave room for the Qt 4 target page.
-->
<wizard version="1" kind="project"
class="qt4project" firstpage="10"
- id="QmlExtensionPlugin" category="G.Libraries"
+ id="QtQuick1ExtensionPlugin" category="G.Libraries"
featuresRequired="QtSupport.Wizards.FeatureQtQuick,QtSupport.Wizards.FeatureQtQuick.1">
<icon>lib.png</icon>
<description>Creates a C++ plugin that makes it possible to offer extensions that can be loaded dynamically into applications using the QDeclarativeEngine class.</description>
- <displayname>Custom QML Extension Plugin</displayname>
+ <displayname>Qt Quick 1 Extension Plugin</displayname>
<displaycategory>Libraries</displaycategory>
<files>
<file source="qmldir" target="qmldir"/>
diff --git a/share/qtcreator/templates/wizards/qtquick2-extension/lib.png b/share/qtcreator/templates/wizards/qtquick2-extension/lib.png
new file mode 100644
index 00000000000..a4e818d986d
--- /dev/null
+++ b/share/qtcreator/templates/wizards/qtquick2-extension/lib.png
Binary files differ
diff --git a/share/qtcreator/templates/wizards/qtquick2-extension/object.cpp b/share/qtcreator/templates/wizards/qtquick2-extension/object.cpp
new file mode 100644
index 00000000000..15fe4052427
--- /dev/null
+++ b/share/qtcreator/templates/wizards/qtquick2-extension/object.cpp
@@ -0,0 +1,15 @@
+#include "%ObjectName:l%.%CppHeaderSuffix%"
+
+%ObjectName%::%ObjectName%(QQuickItem *parent):
+ QQuickItem(parent)
+{
+ // By default, QQuickItem does not draw anything. If you subclass
+ // QQuickItem to create a visual item, you will need to uncomment the
+ // following line and re-implement updatePaintNode()
+
+ // setFlag(ItemHasContents, true);
+}
+
+%ObjectName%::~%ObjectName%()
+{
+}
diff --git a/share/qtcreator/templates/wizards/qtquick2-extension/object.h b/share/qtcreator/templates/wizards/qtquick2-extension/object.h
new file mode 100644
index 00000000000..8297957b499
--- /dev/null
+++ b/share/qtcreator/templates/wizards/qtquick2-extension/object.h
@@ -0,0 +1,18 @@
+#ifndef %ObjectName:u%_H
+#define %ObjectName:u%_H
+
+#include <QQuickItem>
+
+class %ObjectName% : public QQuickItem
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(%ObjectName%)
+
+public:
+ %ObjectName%(QQuickItem *parent = 0);
+ ~%ObjectName%();
+};
+
+QML_DECLARE_TYPE(%ObjectName%)
+
+#endif // %ObjectName:u%_H
diff --git a/share/qtcreator/templates/wizards/qml-extension/plugin.cpp b/share/qtcreator/templates/wizards/qtquick2-extension/plugin.cpp
index 3d92c31f19a..a3715b55159 100644
--- a/share/qtcreator/templates/wizards/qml-extension/plugin.cpp
+++ b/share/qtcreator/templates/wizards/qtquick2-extension/plugin.cpp
@@ -1,7 +1,7 @@
#include "%ProjectName:l%_plugin.%CppHeaderSuffix%"
#include "%ObjectName:l%.%CppHeaderSuffix%"
-#include <qdeclarative.h>
+#include <qqml.h>
void %ProjectName:s%Plugin::registerTypes(const char *uri)
{
@@ -9,4 +9,3 @@ void %ProjectName:s%Plugin::registerTypes(const char *uri)
qmlRegisterType<%ObjectName%>(uri, 1, 0, "%ObjectName%");
}
-Q_EXPORT_PLUGIN2(%ProjectName:s%, %ProjectName:s%Plugin)
diff --git a/share/qtcreator/templates/wizards/qtquick2-extension/plugin.h b/share/qtcreator/templates/wizards/qtquick2-extension/plugin.h
new file mode 100644
index 00000000000..3b0bc2a3550
--- /dev/null
+++ b/share/qtcreator/templates/wizards/qtquick2-extension/plugin.h
@@ -0,0 +1,15 @@
+#ifndef %ProjectName:h%_PLUGIN_H
+#define %ProjectName:h%_PLUGIN_H
+
+#include <QQmlExtensionPlugin>
+
+class %ProjectName:s%Plugin : public QQmlExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
+
+public:
+ void registerTypes(const char *uri);
+};
+
+#endif // %ProjectName:h%_PLUGIN_H
diff --git a/share/qtcreator/templates/wizards/qtquick2-extension/project.pro b/share/qtcreator/templates/wizards/qtquick2-extension/project.pro
new file mode 100644
index 00000000000..7c7794671bb
--- /dev/null
+++ b/share/qtcreator/templates/wizards/qtquick2-extension/project.pro
@@ -0,0 +1,34 @@
+TEMPLATE = lib
+TARGET = %ProjectName%
+QT += qml quick
+CONFIG += qt plugin
+
+TARGET = $$qtLibraryTarget($$TARGET)
+uri = %Uri%
+
+# Input
+SOURCES += \
+ %ProjectName:l%_plugin.%CppSourceSuffix% \
+ %ObjectName:l%.%CppSourceSuffix%
+
+HEADERS += \
+ %ProjectName:l%_plugin.%CppHeaderSuffix% \
+ %ObjectName:l%.%CppHeaderSuffix%
+
+OTHER_FILES = qmldir
+
+!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
+ copy_qmldir.target = $$OUT_PWD/qmldir
+ copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
+ copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
+ QMAKE_EXTRA_TARGETS += copy_qmldir
+ PRE_TARGETDEPS += $$copy_qmldir.target
+}
+
+qmldir.files = qmldir
+unix {
+ installPath = $$[QT_INSTALL_IMPORTS]/$$replace(uri, \\., /)
+ qmldir.path = $$installPath
+ target.path = $$installPath
+ INSTALLS += target qmldir
+}
diff --git a/share/qtcreator/templates/wizards/qtquick2-extension/qmldir b/share/qtcreator/templates/wizards/qtquick2-extension/qmldir
new file mode 100644
index 00000000000..f1f54802f3a
--- /dev/null
+++ b/share/qtcreator/templates/wizards/qtquick2-extension/qmldir
@@ -0,0 +1,2 @@
+module %Uri%
+plugin %ProjectName%
diff --git a/share/qtcreator/templates/wizards/qtquick2-extension/wizard.xml b/share/qtcreator/templates/wizards/qtquick2-extension/wizard.xml
new file mode 100644
index 00000000000..c2754e95eb9
--- /dev/null
+++ b/share/qtcreator/templates/wizards/qtquick2-extension/wizard.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+Custom project wizard configuration example file. Note that by convention,
+the project file goes last.
+The "class" and "firstpage" attributes specify that it is a Qt 4 wizard and
+leave room for the Qt 4 target page.
+-->
+<wizard version="1" kind="project"
+ class="qt4project" firstpage="10"
+ id="QtQuick2ExtensionPlugin" category="G.Libraries"
+ featuresRequired="QtSupport.Wizards.FeatureQtQuick,QtSupport.Wizards.FeatureQtQuick.2">
+ <icon>lib.png</icon>
+ <description>Creates a C++ plugin that makes it possible to offer extensions that can be loaded dynamically into applications using the QQmlEngine class.</description>
+ <displayname>Qt Quick 2 Extension Plugin</displayname>
+ <displaycategory>Libraries</displaycategory>
+ <files>
+ <file source="qmldir" target="qmldir"/>
+ <file source="plugin.h" target="%ProjectName:l%_plugin.%CppHeaderSuffix%"/>
+ <file source="plugin.cpp" target="%ProjectName:l%_plugin.%CppSourceSuffix%"/>
+ <file source="object.h" target="%ObjectName:l%.%CppHeaderSuffix%"/>
+ <file source="object.cpp" target="%ObjectName:l%.%CppSourceSuffix%" openeditor="true"/>
+ <file source="project.pro" target="%ProjectName:l%.pro" openproject="true"/>
+ </files>
+ <!-- Create a 2nd wizard page with parameters -->
+ <fieldpagetitle>Custom QML Extension Plugin Parameters</fieldpagetitle>
+ <fields>
+ <field mandatory="true" name="ObjectName">
+ <fieldcontrol class="QLineEdit" validator='^[A-Za-z0-9_]+$' defaulttext="MyItem"/>
+ <fielddescription>Object Class-name:</fielddescription>
+ </field>
+ <field mandatory="true" name="Uri">
+ <fieldcontrol class="QLineEdit" validator='^[A-Za-z0-9]+([A-Za-z0-9-]*[A-Za-z0-9]+)?(\.[A-Za-z0-9]+([-A-Za-z0-9]*[A-Za-z0-9]+)?)*$' defaulttext="com.mycompany.qmlcomponents"/>
+ <fielddescription>URI:</fielddescription>
+ </field>
+ </fields>
+ <validationrules>
+ <validationrule condition='"%ObjectName%" != "%ProjectName%_plugin"'>
+ <message>The project name and the object class-name cannot be the same.</message>
+ </validationrule>
+ </validationrules>
+</wizard>
diff --git a/share/share.qbs b/share/share.qbs
index f2fa15eaa4e..fcfc8e5b662 100644
--- a/share/share.qbs
+++ b/share/share.qbs
@@ -19,8 +19,6 @@ Product {
}
Group {
- condition: qbs.targetOS == "macx"
- qbs.installDir: "share/qtcreator/scripts"
fileTags: ["install"]
files: "qtcreator/scripts/openTerminal.command"
}
diff --git a/src/app/main.cpp b/src/app/main.cpp
index a963816ae9d..c25affca026 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -359,7 +359,11 @@ int main(int argc, char **argv)
const QString &creatorTrPath = QCoreApplication::applicationDirPath()
+ QLatin1String(SHARE_PATH "/translations");
foreach (QString locale, uiLanguages) {
+#if (QT_VERSION >= 0x050000)
+ locale = QLocale(locale).name();
+#else
locale.replace(QLatin1Char('-'), QLatin1Char('_')); // work around QTBUG-25973
+#endif
if (translator.load(QLatin1String("qtcreator_") + locale, creatorTrPath)) {
const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
const QString &qtTrFile = QLatin1String("qt_") + locale;
diff --git a/src/libs/utils/basetreeview.cpp b/src/libs/utils/basetreeview.cpp
index cce091d75dd..4de87425623 100644
--- a/src/libs/utils/basetreeview.cpp
+++ b/src/libs/utils/basetreeview.cpp
@@ -70,6 +70,8 @@ BaseTreeView::BaseTreeView(QWidget *parent)
connect(this, SIGNAL(activated(QModelIndex)),
SLOT(rowActivatedHelper(QModelIndex)));
+ connect(this, SIGNAL(clicked(QModelIndex)),
+ SLOT(rowClickedHelper(QModelIndex)));
connect(header(), SIGNAL(sectionClicked(int)),
SLOT(headerSectionClicked(int)));
diff --git a/src/libs/utils/basetreeview.h b/src/libs/utils/basetreeview.h
index 46fd24b609c..d2694972bec 100644
--- a/src/libs/utils/basetreeview.h
+++ b/src/libs/utils/basetreeview.h
@@ -49,6 +49,7 @@ public:
void setModel(QAbstractItemModel *model);
virtual void rowActivated(const QModelIndex &) {}
+ virtual void rowClicked(const QModelIndex &) {}
void mousePressEvent(QMouseEvent *ev);
public slots:
@@ -61,6 +62,7 @@ protected slots:
private slots:
void rowActivatedHelper(const QModelIndex &index) { rowActivated(index); }
+ void rowClickedHelper(const QModelIndex &index) { rowClicked(index); }
void headerSectionClicked(int logicalIndex);
private:
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 7fb9569e574..afa16144146 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -1274,9 +1274,13 @@ IEditor *EditorManager::openEditor(Core::Internal::EditorView *view, const QStri
qDebug() << Q_FUNC_INFO << fileName << editorId.name();
QString fn = fileName;
+ QFileInfo fi(fn);
int lineNumber = -1;
- if (flags && EditorManager::CanContainLineNumber)
+ if ((flags & EditorManager::CanContainLineNumber) && !fi.exists()) {
lineNumber = extractLineNumber(&fn);
+ if (lineNumber != -1)
+ fi.setFile(fn);
+ }
if (fn.isEmpty())
return 0;
@@ -1287,13 +1291,12 @@ IEditor *EditorManager::openEditor(Core::Internal::EditorView *view, const QStri
const QList<IEditor *> editors = editorsForFileName(fn);
if (!editors.isEmpty()) {
IEditor *editor = editors.first();
- if (flags && EditorManager::CanContainLineNumber)
+ if (flags & EditorManager::CanContainLineNumber)
editor->gotoLine(lineNumber, -1);
return activateEditor(view, editor, flags);
}
QString realFn = autoSaveName(fn);
- QFileInfo fi(fn);
QFileInfo rfi(realFn);
if (!fi.exists() || !rfi.exists() || fi.lastModified() >= rfi.lastModified()) {
QFile::remove(realFn);
@@ -1327,7 +1330,7 @@ IEditor *EditorManager::openEditor(Core::Internal::EditorView *view, const QStri
if (editor == result)
restoreEditorState(editor);
- if (flags && EditorManager::CanContainLineNumber)
+ if (flags & EditorManager::CanContainLineNumber)
editor->gotoLine(lineNumber, -1);
QApplication::restoreOverrideCursor();
diff --git a/src/plugins/cpptools/cppchecksymbols.cpp b/src/plugins/cpptools/cppchecksymbols.cpp
index 13f06b87bb7..5ccd79f9097 100644
--- a/src/plugins/cpptools/cppchecksymbols.cpp
+++ b/src/plugins/cpptools/cppchecksymbols.cpp
@@ -509,9 +509,11 @@ bool CheckSymbols::visit(SimpleDeclarationAST *ast)
// Add a diagnostic message if non-virtual function has override/final marker
if ((_usages.back().kind != SemanticInfo::VirtualMethodUse)) {
if (funTy->isOverride())
- warning(declrIdNameAST, QCoreApplication::translate("CPlusplus::CheckSymbols", "Only virtual methods can be marked `override'"));
+ warning(declrIdNameAST, QCoreApplication::translate(
+ "CPlusplus::CheckSymbols", "Only virtual methods can be marked `override'"));
else if (funTy->isFinal())
- warning(declrIdNameAST, QCoreApplication::translate("CPlusPlus::CheckSymbols", "Only virtual methods can be marked `final'"));
+ warning(declrIdNameAST, QCoreApplication::translate(
+ "CPlusPlus::CheckSymbols", "Only virtual methods can be marked `final'"));
}
}
}
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index 33b3c52197d..287b20c10b5 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -1415,6 +1415,10 @@ void DebuggerEngine::updateWatchData(const WatchData &, const WatchUpdateFlags &
{
}
+void DebuggerEngine::watchDataSelected(const QByteArray &iname)
+{
+}
+
void DebuggerEngine::watchPoint(const QPoint &)
{
}
diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h
index 3067bbe793e..563e19ba566 100644
--- a/src/plugins/debugger/debuggerengine.h
+++ b/src/plugins/debugger/debuggerengine.h
@@ -149,6 +149,8 @@ public:
virtual void updateWatchData(const Internal::WatchData &data,
const Internal::WatchUpdateFlags & flags = Internal::WatchUpdateFlags());
+ virtual void watchDataSelected(const QByteArray &iname);
+
virtual void startDebugger(DebuggerRunControl *runControl);
virtual void watchPoint(const QPoint &);
diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp
index f1e789d55c8..f1eb0ed5191 100644
--- a/src/plugins/debugger/qml/qmlcppengine.cpp
+++ b/src/plugins/debugger/qml/qmlcppengine.cpp
@@ -34,6 +34,7 @@
#include "stackhandler.h"
#include "qmlengine.h"
#include "watchdata.h"
+#include "watchhandler.h"
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
@@ -135,6 +136,13 @@ void QmlCppEngine::updateWatchData(const WatchData &data,
d->m_activeEngine->updateWatchData(data, flags);
}
+void QmlCppEngine::watchDataSelected(const QByteArray &iname)
+{
+ const WatchData *wd = watchHandler()->findData(iname);
+ if (wd && wd->isInspect())
+ d->m_qmlEngine->watchDataSelected(iname);
+}
+
void QmlCppEngine::watchPoint(const QPoint &point)
{
d->m_cppEngine->watchPoint(point);
diff --git a/src/plugins/debugger/qml/qmlcppengine.h b/src/plugins/debugger/qml/qmlcppengine.h
index 64f531277d8..a1c9534b752 100644
--- a/src/plugins/debugger/qml/qmlcppengine.h
+++ b/src/plugins/debugger/qml/qmlcppengine.h
@@ -50,6 +50,7 @@ public:
TextEditor::ITextEditor * editor, const DebuggerToolTipContext &);
void updateWatchData(const WatchData &data,
const WatchUpdateFlags &flags);
+ void watchDataSelected(const QByteArray &iname);
void watchPoint(const QPoint &);
void fetchMemory(MemoryAgent *, QObject *, quint64 addr, quint64 length);
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index c2274c5e683..6e2885694b5 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -1026,6 +1026,13 @@ void QmlEngine::updateWatchData(const WatchData &data,
watchHandler()->insertData(data);
}
+void QmlEngine::watchDataSelected(const QByteArray &iname)
+{
+ const WatchData *wd = watchHandler()->findData(iname);
+ if (wd && wd->isInspect())
+ m_inspectorAdapter.agent()->watchDataSelected(wd);
+}
+
void QmlEngine::synchronizeWatchers()
{
QStringList watchedExpressions = watchHandler()->watchedExpressions();
diff --git a/src/plugins/debugger/qml/qmlengine.h b/src/plugins/debugger/qml/qmlengine.h
index fa1f3123838..befb33d5b6e 100644
--- a/src/plugins/debugger/qml/qmlengine.h
+++ b/src/plugins/debugger/qml/qmlengine.h
@@ -162,6 +162,7 @@ private:
bool supportsThreads() const { return false; }
void updateWatchData(const WatchData &data,
const WatchUpdateFlags &flags);
+ void watchDataSelected(const QByteArray &iname);
void executeDebuggerCommand(const QString &command, DebuggerLanguages languages);
bool evaluateScript(const QString &expression);
diff --git a/src/plugins/debugger/qml/qmlinspectoradapter.cpp b/src/plugins/debugger/qml/qmlinspectoradapter.cpp
index aac3a9da834..092a6fb2f50 100644
--- a/src/plugins/debugger/qml/qmlinspectoradapter.cpp
+++ b/src/plugins/debugger/qml/qmlinspectoradapter.cpp
@@ -81,6 +81,8 @@ QmlInspectorAdapter::QmlInspectorAdapter(QmlAdapter *debugAdapter,
{
connect(m_agent, SIGNAL(objectFetched(QmlDebug::ObjectReference)),
SLOT(onObjectFetched(QmlDebug::ObjectReference)));
+ connect(m_agent, SIGNAL(jumpToObjectDefinition(QmlDebug::FileReference)),
+ SLOT(jumpToObjectDefinitionInEditor(QmlDebug::FileReference)));
QmlDebugConnection *connection = m_debugAdapter->connection();
DeclarativeEngineDebugClient *engineClient1
@@ -473,7 +475,7 @@ void QmlInspectorAdapter::showConnectionStatusMessage(const QString &message)
m_engine->showMessage(_("QML Inspector: ") + message, LogStatus);
}
-void QmlInspectorAdapter::gotoObjectReferenceDefinition(
+void QmlInspectorAdapter::jumpToObjectDefinitionInEditor(
const FileReference &objSource)
{
if (m_cursorPositionChangedExternally) {
@@ -508,7 +510,7 @@ void QmlInspectorAdapter::selectObject(const ObjectReference &obj,
QList<ObjectReference>() << obj);
if (target == EditorTarget)
- gotoObjectReferenceDefinition(obj.source());
+ jumpToObjectDefinitionInEditor(obj.source());
agent()->selectObjectInTree(obj.debugId());
}
diff --git a/src/plugins/debugger/qml/qmlinspectoradapter.h b/src/plugins/debugger/qml/qmlinspectoradapter.h
index 11833e31732..9f8e76032e0 100644
--- a/src/plugins/debugger/qml/qmlinspectoradapter.h
+++ b/src/plugins/debugger/qml/qmlinspectoradapter.h
@@ -96,6 +96,7 @@ private slots:
void onReload();
void onReloaded();
void onDestroyedObject(int);
+ void jumpToObjectDefinitionInEditor(const QmlDebug::FileReference &objSource);
private:
void setActiveEngineClient(QmlDebug::BaseEngineDebugClient *client);
@@ -103,8 +104,6 @@ private:
void initializePreviews();
void showConnectionStatusMessage(const QString &message);
- void gotoObjectReferenceDefinition(const QmlDebug::FileReference &objSource);
-
enum SelectionTarget { NoTarget, ToolTarget, EditorTarget };
void selectObject(
const QmlDebug::ObjectReference &objectReference,
diff --git a/src/plugins/debugger/qml/qmlinspectoragent.cpp b/src/plugins/debugger/qml/qmlinspectoragent.cpp
index cafbe8d243a..98ce44f9b74 100644
--- a/src/plugins/debugger/qml/qmlinspectoragent.cpp
+++ b/src/plugins/debugger/qml/qmlinspectoragent.cpp
@@ -121,6 +121,17 @@ void QmlInspectorAgent::updateWatchData(const WatchData &data)
}
}
+void QmlInspectorAgent::watchDataSelected(const WatchData *data)
+{
+ if (debug)
+ qDebug() << __FUNCTION__ << '(' << data->id << ')';
+
+ if (data->id) {
+ QTC_ASSERT(m_debugIdLocations.keys().contains(data->id), return);
+ emit jumpToObjectDefinition(m_debugIdLocations.value(data->id));
+ }
+}
+
bool QmlInspectorAgent::selectObjectInTree(int debugId)
{
if (debug) {
diff --git a/src/plugins/debugger/qml/qmlinspectoragent.h b/src/plugins/debugger/qml/qmlinspectoragent.h
index 7f60e5cd8f3..2bc2f1ba64c 100644
--- a/src/plugins/debugger/qml/qmlinspectoragent.h
+++ b/src/plugins/debugger/qml/qmlinspectoragent.h
@@ -60,6 +60,7 @@ public:
void assignValue(const WatchData *data, const QString &expression, const QVariant &valueV);
void updateWatchData(const WatchData &data);
+ void watchDataSelected(const WatchData *data);
bool selectObjectInTree(int debugId);
quint32 setBindingForObject(int objectDebugId,
@@ -101,6 +102,7 @@ signals:
void propertyChanged(int debugId, const QByteArray &propertyName,
const QVariant &propertyValue);
void automaticUpdateFailed();
+ void jumpToObjectDefinition(const QmlDebug::FileReference &objSource);
private slots:
void updateStatus();
diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp
index 89c66839acd..36295a91120 100644
--- a/src/plugins/debugger/watchwindow.cpp
+++ b/src/plugins/debugger/watchwindow.cpp
@@ -992,6 +992,11 @@ void WatchTreeView::setModel(QAbstractItemModel *model)
SLOT(handleItemIsExpanded(QModelIndex)));
}
+void WatchTreeView::rowClicked(const QModelIndex &index)
+{
+ currentEngine()->watchDataSelected(currentEngine()->watchHandler()->watchData(index)->iname);
+}
+
void WatchTreeView::handleItemIsExpanded(const QModelIndex &idx)
{
bool on = idx.data(LocalsExpandedRole).toBool();
diff --git a/src/plugins/debugger/watchwindow.h b/src/plugins/debugger/watchwindow.h
index 16aaf5c9e2c..c284332a7b8 100644
--- a/src/plugins/debugger/watchwindow.h
+++ b/src/plugins/debugger/watchwindow.h
@@ -51,6 +51,7 @@ public:
explicit WatchTreeView(Type type, QWidget *parent = 0);
Type type() const { return m_type; }
void setModel(QAbstractItemModel *model);
+ void rowClicked(const QModelIndex &index);
void reset();
public slots:
diff --git a/src/plugins/madde/maemoinstalltosysrootstep.cpp b/src/plugins/madde/maemoinstalltosysrootstep.cpp
index 885c5764a52..eb145536d9d 100644
--- a/src/plugins/madde/maemoinstalltosysrootstep.cpp
+++ b/src/plugins/madde/maemoinstalltosysrootstep.cpp
@@ -341,14 +341,14 @@ bool MaemoMakeInstallToSysrootStep::init()
const Qt4BuildConfiguration * const bc
= qobject_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration());
if (!bc) {
- addOutput("Cannot deploy: No active build dconfiguration.",
+ addOutput(tr("Cannot deploy: No active build dconfiguration."),
ErrorMessageOutput);
return false;
}
const QtSupport::BaseQtVersion *const qtVersion
= QtSupport::QtKitInformation::qtVersion(target()->kit());
if (!qtVersion) {
- addOutput("Cannot deploy: Unusable build configuration.",
+ addOutput(tr("Cannot deploy: Unusable build configuration."),
ErrorMessageOutput);
return false;
diff --git a/src/plugins/madde/maemoqemumanager.cpp b/src/plugins/madde/maemoqemumanager.cpp
index eddcb42ab9d..1a569e3932e 100644
--- a/src/plugins/madde/maemoqemumanager.cpp
+++ b/src/plugins/madde/maemoqemumanager.cpp
@@ -87,7 +87,7 @@ MaemoQemuManager::MaemoQemuManager(QObject *parent)
m_qemuStarterIcon.addFile(":/qt-maemo/images/qemu-stop.png", iconSize,
QIcon::Normal, QIcon::On);
- m_qemuAction = new QAction("MeeGo Emulator", this);
+ m_qemuAction = new QAction(tr("MeeGo Emulator"), this);
m_qemuAction->setIcon(m_qemuStarterIcon.pixmap(iconSize));
m_qemuAction->setToolTip(tr("Start MeeGo Emulator"));
connect(m_qemuAction, SIGNAL(triggered()), this, SLOT(startRuntime()));
diff --git a/src/plugins/qmljseditor/qmljspreviewrunner.cpp b/src/plugins/qmljseditor/qmljspreviewrunner.cpp
index 07e2a044f33..54b84b1ce18 100644
--- a/src/plugins/qmljseditor/qmljspreviewrunner.cpp
+++ b/src/plugins/qmljseditor/qmljspreviewrunner.cpp
@@ -68,7 +68,7 @@ void QmlJSPreviewRunner::run(const QString &filename)
Utils::QtcProcess::quoteArg(filename));
} else {
- errorMessage = "No file specified.";
+ errorMessage = tr("No file specified.");
}
if (!errorMessage.isEmpty())
diff --git a/src/plugins/remotelinux/linuxdevicetester.cpp b/src/plugins/remotelinux/linuxdevicetester.cpp
index 10a66cc4c15..e7801c77cb8 100644
--- a/src/plugins/remotelinux/linuxdevicetester.cpp
+++ b/src/plugins/remotelinux/linuxdevicetester.cpp
@@ -124,7 +124,7 @@ void GenericLinuxDeviceTester::handleConnected()
d->process = d->connection->createRemoteProcess("uname -rsm");
connect(d->process.data(), SIGNAL(closed(int)), SLOT(handleProcessFinished(int)));
- emit progressMessage("Checking kernel version...");
+ emit progressMessage(tr("Checking kernel version..."));
d->state = RunningUname;
d->process->start();
}
@@ -172,7 +172,7 @@ void GenericLinuxDeviceTester::handlePortListReady()
QTC_ASSERT(d->state == TestingPorts, return);
if (d->portsGatherer.usedPorts().isEmpty()) {
- emit progressMessage("All specified ports are available.\n");
+ emit progressMessage(tr("All specified ports are available.\n"));
} else {
QString portList;
foreach (const int port, d->portsGatherer.usedPorts())
diff --git a/src/plugins/remotelinux/packageuploader.cpp b/src/plugins/remotelinux/packageuploader.cpp
index 1e27435f49c..e1ace23e298 100644
--- a/src/plugins/remotelinux/packageuploader.cpp
+++ b/src/plugins/remotelinux/packageuploader.cpp
@@ -110,7 +110,7 @@ void PackageUploader::handleSftpChannelInitialized()
setState(Inactive);
emit uploadFinished(tr("Package upload failed: Could not open file."));
} else {
- emit progress("Starting upload...");
+ emit progress(tr("Starting upload..."));
setState(Uploading);
}
}
diff --git a/src/plugins/texteditor/behaviorsettingswidget.cpp b/src/plugins/texteditor/behaviorsettingswidget.cpp
index abc9549a07a..629fbcfc3c0 100644
--- a/src/plugins/texteditor/behaviorsettingswidget.cpp
+++ b/src/plugins/texteditor/behaviorsettingswidget.cpp
@@ -174,10 +174,13 @@ void BehaviorSettingsWidget::assignedStorageSettings(StorageSettings *storageSet
void BehaviorSettingsWidget::updateConstrainTooltipsBoxTooltip() const
{
- if (d->m_ui.constrainTooltipsBox->currentIndex() == 0)
- d->m_ui.constrainTooltipsBox->setToolTip(tr("Display context-sensitive help or type information on mouseover."));
- else
- d->m_ui.constrainTooltipsBox->setToolTip(tr("Display context-sensitive help or type information on Shift+Mouseover."));
+ if (d->m_ui.constrainTooltipsBox->currentIndex() == 0) {
+ d->m_ui.constrainTooltipsBox->setToolTip(
+ tr("Display context-sensitive help or type information on mouseover."));
+ } else {
+ d->m_ui.constrainTooltipsBox->setToolTip(
+ tr("Display context-sensitive help or type information on Shift+Mouseover."));
+ }
}
void BehaviorSettingsWidget::setAssignedBehaviorSettings(const BehaviorSettings &behaviorSettings)
diff --git a/src/shared/qtsingleapplication/qtsingleapplication.cpp b/src/shared/qtsingleapplication/qtsingleapplication.cpp
index 7aa14dfe19e..602b8d0d4e0 100644
--- a/src/shared/qtsingleapplication/qtsingleapplication.cpp
+++ b/src/shared/qtsingleapplication/qtsingleapplication.cpp
@@ -59,36 +59,6 @@ QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char *
sysInit(appId);
}
-
-QtSingleApplication::QtSingleApplication(int &argc, char **argv, Type type)
- : QApplication(argc, argv, type)
-{
- sysInit();
-}
-
-
-#if defined(Q_WS_X11)
-QtSingleApplication::QtSingleApplication(Display* dpy, Qt::HANDLE visual, Qt::HANDLE colormap)
- : QApplication(dpy, visual, colormap)
-{
- sysInit();
-}
-
-QtSingleApplication::QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap)
- : QApplication(dpy, argc, argv, visual, cmap)
-{
- sysInit();
-}
-
-QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId,
- int argc, char **argv, Qt::HANDLE visual, Qt::HANDLE colormap)
- : QApplication(dpy, argc, argv, visual, colormap)
-{
- this->appId = appId;
- sysInit(appId);
-}
-#endif
-
bool QtSingleApplication::event(QEvent *event)
{
if (event->type() == QEvent::FileOpen) {
diff --git a/src/shared/qtsingleapplication/qtsingleapplication.h b/src/shared/qtsingleapplication/qtsingleapplication.h
index efe74473f6e..ce6a098753a 100644
--- a/src/shared/qtsingleapplication/qtsingleapplication.h
+++ b/src/shared/qtsingleapplication/qtsingleapplication.h
@@ -40,11 +40,6 @@ class QtSingleApplication : public QApplication
public:
QtSingleApplication(int &argc, char **argv, bool GUIenabled = true);
QtSingleApplication(const QString &id, int &argc, char **argv);
- QtSingleApplication(int &argc, char **argv, Type type);
-#if defined(Q_WS_X11)
- explicit QtSingleApplication(Display *dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
- QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0);
-#endif
bool isRunning(qint64 pid = -1);
@@ -63,10 +58,6 @@ public Q_SLOTS:
//Obsolete methods:
public:
void initialize(bool = true);
-
-#if defined(Q_WS_X11)
- QtSingleApplication(Display* dpy, const QString &id, int argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
-#endif
// end obsolete methods
Q_SIGNALS: