OSDN Git Service

Merge remote branch 'origin/2.1'
authordt <qtc-committer@nokia.com>
Mon, 4 Oct 2010 14:07:46 +0000 (16:07 +0200)
committerdt <qtc-committer@nokia.com>
Mon, 4 Oct 2010 14:07:46 +0000 (16:07 +0200)
Conflicts:
share/qtcreator/templates/mobileapp/app.pro
share/qtcreator/templates/qmlapp/app.pro
src/plugins/cpptools/cpptools.pro

92 files changed:
README
doc/qt-html-templates.qdocconf
doc/qtcreator.qdoc
doc/qtcreator.qdocconf
share/qtcreator/templates/mobileapp/app.pro
share/qtcreator/templates/qmlapp/app.pro
share/qtcreator/templates/wizards/qtcreatorplugin/MyPlugin.pluginspec
src/app/Info.plist
src/libs/utils/utils-lib.pri
src/plugins/bineditor/BinEditor.pluginspec
src/plugins/bookmarks/Bookmarks.pluginspec
src/plugins/classview/ClassView.pluginspec
src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec
src/plugins/cmakeprojectmanager/cmakeproject.cpp
src/plugins/cmakeprojectmanager/cmakeproject.h
src/plugins/cmakeprojectmanager/cmakeprojectmanager.pro
src/plugins/cmakeprojectmanager/cmakeprojectmanager_dependencies.pri
src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.cpp [new file with mode: 0644]
src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.h [new file with mode: 0644]
src/plugins/coreplugin/Core.pluginspec
src/plugins/coreplugin/coreconstants.h
src/plugins/cpaster/CodePaster.pluginspec
src/plugins/cpaster/cpaster_dependencies.pri
src/plugins/cppeditor/CppEditor.pluginspec
src/plugins/cpptools/CppTools.pluginspec
src/plugins/cpptools/cpptools.pro
src/plugins/cpptools/uicodecompletionsupport.cpp [new file with mode: 0644]
src/plugins/cpptools/uicodecompletionsupport.h [new file with mode: 0644]
src/plugins/cvs/CVS.pluginspec
src/plugins/debugger/Debugger.pluginspec
src/plugins/debugger/breakhandler.cpp
src/plugins/debugger/breakhandler.h
src/plugins/debugger/debuggerengine.cpp
src/plugins/debugger/debuggerengine.h
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.h
src/plugins/debugger/gdb/tcftrkgdbadapter.cpp
src/plugins/debugger/qml/qmlcppengine.cpp
src/plugins/debugger/qml/qmlcppengine.h
src/plugins/debugger/qml/qmlengine.cpp
src/plugins/debugger/qml/qmlengine.h
src/plugins/designer/Designer.pluginspec
src/plugins/designer/designer_dependencies.pri
src/plugins/designer/formeditorplugin.cpp
src/plugins/fakevim/FakeVim.pluginspec
src/plugins/fakevim/fakevimhandler.cpp
src/plugins/fakevim/fakevimplugin.cpp
src/plugins/find/Find.pluginspec
src/plugins/find/basetextfind.cpp
src/plugins/genericprojectmanager/GenericProjectManager.pluginspec
src/plugins/genericprojectmanager/genericprojectmanager_dependencies.pri
src/plugins/git/ScmGit.pluginspec
src/plugins/helloworld/HelloWorld.pluginspec
src/plugins/help/Help.pluginspec
src/plugins/imageviewer/ImageViewer.pluginspec
src/plugins/locator/Locator.pluginspec
src/plugins/mercurial/Mercurial.pluginspec
src/plugins/perforce/Perforce.pluginspec
src/plugins/plugins.pro
src/plugins/projectexplorer/ProjectExplorer.pluginspec
src/plugins/qmldesigner/QmlDesigner.pluginspec
src/plugins/qmljseditor/QmlJSEditor.pluginspec
src/plugins/qmljsinspector/QmlJSInspector.pluginspec
src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec
src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec
src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri
src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp
src/plugins/qt4projectmanager/qtuicodemodelsupport.h
src/plugins/qt4projectmanager/wizards/mobileapp.cpp
src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp
src/plugins/regexp/RegExp.pluginspec
src/plugins/resourceeditor/ResourceEditor.pluginspec
src/plugins/snippets/Snippets.pluginspec
src/plugins/subversion/Subversion.pluginspec
src/plugins/tasklist/TaskList.pluginspec
src/plugins/texteditor/TextEditor.pluginspec
src/plugins/texteditor/texteditoroverlay.cpp
src/plugins/vcsbase/VCSBase.pluginspec
src/plugins/vcsbase/basecheckoutwizard.cpp
src/plugins/welcome/Welcome.pluginspec
src/shared/symbianutils/json.cpp
src/shared/symbianutils/tcftrkmessage.cpp
src/shared/symbianutils/tcftrkmessage.h
src/tools/qml/qmldom/main.cpp [deleted file]
src/tools/qml/qmldom/qmldom.pro [deleted file]
src/tools/qml/qmlmetatype/main.cpp [deleted file]
src/tools/qml/qmlmetatype/qmlmetatype.pro [deleted file]
tests/auto/cplusplus/shared/shared.pri
tests/auto/fakevim/fakevim.pro
tests/manual/fakevim/fakevim.pro
tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp
tests/manual/ssh/main.cpp

diff --git a/README b/README
index 0bf7253..83ee26c 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Qt Creator 2.0.91
+Qt Creator 2.1.81
 ===============
 Qt Creator is a crossplatform C++ IDE for development with the Qt framework.
 
index 9af13c6..ac94225 100644 (file)
@@ -21,7 +21,7 @@ HTML.postheader         = " <div class=\"header\" id=\"qtdocheader\">\n" \
                          "    </div>\n" \
                          "    <div id=\"shortCut\">\n" \
                          "      <ul>\n" \
-                         "        <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt Creator 2.0.91 </a></span></li>\n" \
+                         "        <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt Creator 2.1.81 </a></span></li>\n" \
                          "        <li class=\"shortCut-topleft-active\"><a href=\"http://doc.qt.nokia.com\">ALL VERSIONS" \
                          "        </a></li>\n" \
                          "      </ul>\n" \
index 85a1ed9..9e94de8 100644 (file)
@@ -39,7 +39,7 @@
 
     \title Qt Creator Manual
 
-    \section1 Version 2.0.91
+    \section1 Version 2.1.81
 
     Qt Creator provides a cross-platform, complete integrated development
     environment (IDE) for application developers to create applications for
index 7ea9885..6672a40 100644 (file)
@@ -20,12 +20,12 @@ sources.fileextensions  = "qtcreator.qdoc maemodev.qdoc symbiandev.qdoc addressb
 
 qhp.projects            = QtCreator
 qhp.QtCreator.file             = qtcreator.qhp
-qhp.QtCreator.namespace        = com.nokia.qtcreator.2091
+qhp.QtCreator.namespace        = com.nokia.qtcreator.2181
 qhp.QtCreator.virtualFolder    = doc
 qhp.QtCreator.indexTitle       = Qt Creator
-qhp.QtCreator.filterAttributes = qtcreator 2.0.91
-qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 2.0.91
-qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 2.0.91
+qhp.QtCreator.filterAttributes = qtcreator 2.1.81
+qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 2.1.81
+qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 2.1.81
 qhp.QtCreator.indexRoot        =
 qhp.QtCreator.extraFiles       = style/style.css \
                           style/style_ie6.css \
index 9936500..a832c6b 100644 (file)
@@ -15,6 +15,13 @@ DEFINES += NETWORKACCESS
 # TARGETUID3 #
 symbian:TARGET.UID3 = 0xE1111234
 
+# Smart Installer package's UID
+# This UID is from the protected range 
+# and therefore the package will fail to install if self-signed
+# By default qmake uses the unprotected range value if unprotected UID is defined for the application
+# and 0x2002CCCF value if protected UID is given to the application
+#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
+
 SOURCES += main.cpp mainwindow.cpp
 HEADERS += mainwindow.h
 FORMS += mainwindow.ui
index cb0abcb..8cfa591 100644 (file)
@@ -20,6 +20,13 @@ DEFINES += NETWORKACCESS
 # TARGETUID3 #
 symbian:TARGET.UID3 = 0xE1111234
 
+# Smart Installer package's UID
+# This UID is from the protected range 
+# and therefore the package will fail to install if self-signed
+# By default qmake uses the unprotected range value if unprotected UID is defined for the application
+# and 0x2002CCCF value if protected UID is given to the application
+#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
+
 # Define QMLJSDEBUGGER to enable basic debugging (setting breakpoints etc)
 # Define QMLOBSERVER for advanced features (requires experimental QmlInspector plugin!)
 #DEFINES += QMLJSDEBUGGER
index 60e6f8d..c7c5e2f 100644 (file)
@@ -5,6 +5,6 @@
     <description>%Description%</description>
     <url>%URL%</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 8dc51bd..ce122da 100644 (file)
        <key>CFBundleIdentifier</key>
        <string>com.nokia.qtcreator</string>
        <key>CFBundleVersion</key>
-       <string>2.0.91</string>
+       <string>2.1.81</string>
        <key>CFBundleShortVersionString</key>
-       <string>2.0.91</string>
+       <string>2.1.81</string>
 </dict>
 </plist>
index 4cbc17d..3cafe99 100644 (file)
@@ -5,6 +5,7 @@ dll {
 }
 
 INCLUDEPATH += $$PWD
+QT += network
 
 SOURCES += $$PWD/environment.cpp \
     $$PWD/reloadpromptutils.cpp \
index a34d8ba..0755010 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="BinEditor" version="2.0.91" compatVersion="2.0.91">
+<plugin name="BinEditor" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,7 +14,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Binary editor component.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="TextEditor" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="TextEditor" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 3420f3b..9c659c2 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Bookmarks" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Bookmarks" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,8 +14,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Bookmarks in text editors.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="Core" version="2.0.91"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="Core" version="2.1.81"/>
     </dependencyList>
 </plugin>
index c347197..77f7657 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="ClassView" version="2.0.91" compatVersion="2.0.91">
+<plugin name="ClassView" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Denis Mingulov</copyright>
     <license>
@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Class View component.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="CppTools" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="TextEditor" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="CppTools" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="TextEditor" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 1e019d2..2719a92 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="CMakeProjectManager" version="2.0.91" compatVersion="2.0.91">
+<plugin name="CMakeProjectManager" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>CMake support</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="CppTools" version="2.0.91"/>
-        <dependency name="CppEditor" version="2.0.91"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="CppTools" version="2.1.81"/>
+        <dependency name="Designer" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 14c65d6..a6c62ef 100644 (file)
 #include "makestep.h"
 #include "cmakeopenprojectwizard.h"
 #include "cmakebuildconfiguration.h"
+#include "cmakeuicodemodelsupport.h"
 
 #include <projectexplorer/projectexplorerconstants.h>
+#include <projectexplorer/projectexplorer.h>
 #include <projectexplorer/buildenvironmentwidget.h>
 #include <projectexplorer/buildsteplist.h>
+#include <projectexplorer/buildmanager.h>
 #include <cpptools/cppmodelmanagerinterface.h>
 #include <extensionsystem/pluginmanager.h>
+#include <designer/formwindoweditor.h>
 #include <utils/qtcassert.h>
 #include <coreplugin/icore.h>
+#include <coreplugin/editormanager/editormanager.h>
 
 #include <QtCore/QMap>
 #include <QtCore/QDebug>
@@ -74,7 +79,8 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
       m_fileName(fileName),
       m_rootNode(new CMakeProjectNode(m_fileName)),
       m_insideFileChanged(false),
-      m_targetFactory(new CMakeTargetFactory(this))
+      m_targetFactory(new CMakeTargetFactory(this)),
+      m_lastEditor(0)
 {
     m_file = new CMakeFile(this, fileName);
 
@@ -84,6 +90,17 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
 
 CMakeProject::~CMakeProject()
 {
+    // Remove CodeModel support
+    CppTools::CppModelManagerInterface *modelManager
+            = ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
+    QMap<QString, CMakeUiCodeModelSupport *>::const_iterator it, end;
+    it = m_uiCodeModelSupport.constBegin();
+    end = m_uiCodeModelSupport.constEnd();
+    for (; it!=end; ++it) {
+        modelManager->removeEditorSupport(it.value());
+        delete it.value();
+    }
+
     m_codeModelFuture.cancel();
     delete m_rootNode;
 }
@@ -229,7 +246,24 @@ bool CMakeProject::parseCMakeLists()
 //            qDebug()<<"";
 //        }
 
+
+    // TOOD this code ain't very pretty ...
+    m_uicCommand.clear();
+    QFile cmakeCache(activeBC->buildDirectory() + "/CMakeCache.txt");
+    cmakeCache.open(QIODevice::ReadOnly);
+    while (!cmakeCache.atEnd()) {
+        QString line = cmakeCache.readLine();
+        if (line.startsWith("QT_UIC_EXECUTABLE")) {
+            if (int pos = line.indexOf('=')) {
+                m_uicCommand = line.mid(pos + 1).trimmed();
+            }
+            break;
+        }
+    }
+    cmakeCache.close();
+
     //qDebug()<<"Updating CodeModel";
+    createUiCodeModelSupport();
 
     QStringList allIncludePaths;
     QStringList allFrameworkPaths;
@@ -533,6 +567,16 @@ bool CMakeProject::fromMap(const QVariantMap &map)
         connect(t, SIGNAL(environmentChanged()),
                 this, SLOT(changeEnvironment()));
     }
+
+    connect(Core::EditorManager::instance(), SIGNAL(editorAboutToClose(Core::IEditor*)),
+            this, SLOT(editorAboutToClose(Core::IEditor*)));
+
+    connect(Core::EditorManager::instance(), SIGNAL(currentEditorChanged(Core::IEditor*)),
+            this, SLOT(editorChanged(Core::IEditor*)));
+
+    connect(ProjectExplorer::ProjectExplorerPlugin::instance()->buildManager(), SIGNAL(buildStateChanged(ProjectExplorer::Project*)),
+            this, SLOT(buildStateChanged(ProjectExplorer::Project*)));
+
     return true;
 }
 
@@ -544,6 +588,140 @@ CMakeBuildTarget CMakeProject::buildTargetForTitle(const QString &title)
     return CMakeBuildTarget();
 }
 
+QString CMakeProject::uicCommand() const
+{
+    return m_uicCommand;
+}
+
+QString CMakeProject::uiHeaderFile(const QString &uiFile)
+{
+    QDir srcDirRoot = QDir(projectDirectory());
+    QString relativePath = srcDirRoot.relativeFilePath(uiFile);
+    QDir buildDir = QDir(activeTarget()->activeBuildConfiguration()->buildDirectory());
+    QString uiHeaderFilePath = buildDir.absoluteFilePath(relativePath);
+
+    QFileInfo fi(uiHeaderFilePath);
+    uiHeaderFilePath = fi.absolutePath();
+    uiHeaderFilePath += QLatin1String("/ui_");
+    uiHeaderFilePath += fi.completeBaseName();
+    uiHeaderFilePath += QLatin1String(".h");
+    return QDir::cleanPath(uiHeaderFilePath);
+}
+
+void CMakeProject::createUiCodeModelSupport()
+{
+//    qDebug()<<"creatUiCodeModelSupport()";
+    CppTools::CppModelManagerInterface *modelManager
+            = ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
+
+    // First move all to
+    QMap<QString, CMakeUiCodeModelSupport *> oldCodeModelSupport;
+    oldCodeModelSupport = m_uiCodeModelSupport;
+    m_uiCodeModelSupport.clear();
+
+    // Find all ui files
+    foreach (const QString &uiFile, m_files) {
+        if (uiFile.endsWith(".ui")) {
+            // UI file, not convert to
+            QString uiHeaderFilePath = uiHeaderFile(uiFile);
+            QMap<QString, CMakeUiCodeModelSupport *>::iterator it
+                    = oldCodeModelSupport.find(uiFile);
+            if (it != oldCodeModelSupport.end()) {
+                //                qDebug()<<"updated old codemodelsupport";
+                CMakeUiCodeModelSupport *cms = it.value();
+                cms->setFileName(uiHeaderFilePath);
+                m_uiCodeModelSupport.insert(it.key(), cms);
+                oldCodeModelSupport.erase(it);
+            } else {
+                //                qDebug()<<"adding new codemodelsupport";
+                CMakeUiCodeModelSupport *cms = new CMakeUiCodeModelSupport(modelManager, this, uiFile, uiHeaderFilePath);
+                m_uiCodeModelSupport.insert(uiFile, cms);
+                modelManager->addEditorSupport(cms);
+            }
+        }
+    }
+
+    // Remove old
+    QMap<QString, CMakeUiCodeModelSupport *>::const_iterator it, end;
+    end = oldCodeModelSupport.constEnd();
+    for (it = oldCodeModelSupport.constBegin(); it!=end; ++it) {
+        modelManager->removeEditorSupport(it.value());
+        delete it.value();
+    }
+}
+
+void CMakeProject::updateCodeModelSupportFromEditor(const QString &uiFileName,
+                                                    const QString &contents)
+{
+    const QMap<QString, CMakeUiCodeModelSupport *>::const_iterator it =
+            m_uiCodeModelSupport.constFind(uiFileName);
+    if (it != m_uiCodeModelSupport.constEnd())
+        it.value()->updateFromEditor(contents);
+}
+
+void CMakeProject::editorChanged(Core::IEditor *editor)
+{
+    // Handle old editor
+    Designer::FormWindowEditor *lastFormEditor = qobject_cast<Designer::FormWindowEditor *>(m_lastEditor);
+    if (lastFormEditor) {
+        disconnect(lastFormEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
+
+        if (m_dirtyUic) {
+            const QString contents = lastFormEditor->contents();
+            updateCodeModelSupportFromEditor(lastFormEditor->file()->fileName(), contents);
+            m_dirtyUic = false;
+        }
+    }
+
+    m_lastEditor = editor;
+
+    // Handle new editor
+    if (Designer::FormWindowEditor *fw = qobject_cast<Designer::FormWindowEditor *>(editor))
+        connect(fw, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
+}
+
+void CMakeProject::editorAboutToClose(Core::IEditor *editor)
+{
+    if (m_lastEditor == editor) {
+        // Oh no our editor is going to be closed
+        // get the content first
+        Designer::FormWindowEditor *lastEditor = qobject_cast<Designer::FormWindowEditor *>(m_lastEditor);
+        if (lastEditor) {
+            disconnect(lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
+            if (m_dirtyUic) {
+                const QString contents = lastEditor->contents();
+                updateCodeModelSupportFromEditor(lastEditor->file()->fileName(), contents);
+                m_dirtyUic = false;
+            }
+        }
+        m_lastEditor = 0;
+    }
+}
+
+void CMakeProject::uiEditorContentsChanged()
+{
+    // cast sender, get filename
+    if (m_dirtyUic)
+        return;
+    Designer::FormWindowEditor *fw = qobject_cast<Designer::FormWindowEditor *>(sender());
+    if (!fw)
+        return;
+    m_dirtyUic = true;
+}
+
+void CMakeProject::buildStateChanged(ProjectExplorer::Project *project)
+{
+    if (project == this) {
+        if (!ProjectExplorer::ProjectExplorerPlugin::instance()->buildManager()->isBuilding(this)) {
+            QMap<QString, CMakeUiCodeModelSupport *>::const_iterator it, end;
+            end = m_uiCodeModelSupport.constEnd();
+            for (it = m_uiCodeModelSupport.constBegin(); it != end; ++it) {
+                it.value()->updateFromBuild();
+            }
+        }
+    }
+}
+
 // CMakeFile
 
 CMakeFile::CMakeFile(CMakeProject *parent, QString fileName)
index d9128da..f927b69 100644 (file)
@@ -43,6 +43,7 @@
 #include <projectexplorer/filewatcher.h>
 #include <projectexplorer/buildconfiguration.h>
 #include <coreplugin/ifile.h>
+#include <coreplugin/editormanager/ieditor.h>
 
 #include <QtCore/QXmlStreamReader>
 #include <QtGui/QPushButton>
@@ -53,6 +54,7 @@ namespace Internal {
 
 class CMakeFile;
 class CMakeBuildSettingsWidget;
+class CMakeUiCodeModelSupport;
 
 struct CMakeBuildTarget
 {
@@ -100,6 +102,8 @@ public:
 
     bool parseCMakeLists();
 
+    QString uicCommand() const;
+
 signals:
     /// emitted after parsing
     void buildTargetsChanged();
@@ -115,15 +119,23 @@ private slots:
     void changeActiveBuildConfiguration(ProjectExplorer::BuildConfiguration*);
     void targetAdded(ProjectExplorer::Target *);
 
+    void editorChanged(Core::IEditor *editor);
+    void editorAboutToClose(Core::IEditor *editor);
+    void uiEditorContentsChanged();
+    void buildStateChanged(ProjectExplorer::Project *project);
 private:
     void buildTree(CMakeProjectNode *rootNode, QList<ProjectExplorer::FileNode *> list);
     void gatherFileNodes(ProjectExplorer::FolderNode *parent, QList<ProjectExplorer::FileNode *> &list);
     ProjectExplorer::FolderNode *findOrCreateFolder(CMakeProjectNode *rootNode, QString directory);
+    void updateCodeModelSupportFromEditor(const QString &uiFileName, const QString &contents);
+    void createUiCodeModelSupport();
+    QString uiHeaderFile(const QString &uiFile);
 
     CMakeManager *m_manager;
     QString m_fileName;
     CMakeFile *m_file;
     QString m_projectName;
+    QString m_uicCommand;
 
     // TODO probably need a CMake specific node structure
     CMakeProjectNode *m_rootNode;
@@ -134,6 +146,10 @@ private:
     QSet<QString> m_watchedFiles;
     CMakeTargetFactory *m_targetFactory;
     QFuture<void> m_codeModelFuture;
+
+    QMap<QString, CMakeUiCodeModelSupport *> m_uiCodeModelSupport;
+    Core::IEditor *m_lastEditor;
+    bool m_dirtyUic;
 };
 
 class CMakeCbpParser : public QXmlStreamReader
index 8a94e4a..1f54025 100644 (file)
@@ -14,7 +14,8 @@ HEADERS = cmakeproject.h \
     cmakebuildconfiguration.h \
     cmakeeditorfactory.h \
     cmakeeditor.h \
-    cmakehighlighter.h
+    cmakehighlighter.h \
+    cmakeuicodemodelsupport.h
 SOURCES = cmakeproject.cpp \
     cmakeprojectplugin.cpp \
     cmakeprojectmanager.cpp \
@@ -26,7 +27,8 @@ SOURCES = cmakeproject.cpp \
     cmakebuildconfiguration.cpp \
     cmakeeditorfactory.cpp \
     cmakeeditor.cpp \
-    cmakehighlighter.cpp
+    cmakehighlighter.cpp \
+    cmakeuicodemodelsupport.cpp
 RESOURCES += cmakeproject.qrc
 FORMS +=
 
index 80118ad..7785312 100644 (file)
@@ -1,4 +1,4 @@
 include(../../plugins/projectexplorer/projectexplorer.pri)
 include(../../plugins/cpptools/cpptools.pri)
-include(../../plugins/cppeditor/cppeditor.pri)
 include(../../plugins/texteditor/texteditor.pri)
+include(../../plugins/designer/designer.pri)
diff --git a/src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.cpp b/src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.cpp
new file mode 100644 (file)
index 0000000..e6736f5
--- /dev/null
@@ -0,0 +1,64 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#include "cmakeuicodemodelsupport.h"
+#include "cmakeproject.h"
+#include "cmaketarget.h"
+#include "cmakebuildconfiguration.h"
+
+#include <QtCore/QProcess>
+
+using namespace CMakeProjectManager;
+using namespace Internal;
+
+CMakeUiCodeModelSupport::CMakeUiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
+                                             CMakeProject *project,
+                                             const QString &source,
+                                             const QString &uiHeaderFile)
+    : CppTools::UiCodeModelSupport(modelmanager, source, uiHeaderFile),
+      m_project(project)
+{
+
+}
+
+CMakeUiCodeModelSupport::~CMakeUiCodeModelSupport()
+{
+
+}
+
+QString CMakeUiCodeModelSupport::uicCommand() const
+{
+    return m_project->uicCommand();
+}
+
+QStringList CMakeUiCodeModelSupport::environment() const
+{
+    CMakeBuildConfiguration *bc = m_project->activeTarget()->activeBuildConfiguration();
+    return bc->environment().toStringList();
+}
diff --git a/src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.h b/src/plugins/cmakeprojectmanager/cmakeuicodemodelsupport.h
new file mode 100644 (file)
index 0000000..dc297d3
--- /dev/null
@@ -0,0 +1,61 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef CMAKEUICODEMODELSUPPORT_H
+#define CMAKEUICODEMODELSUPPORT_H
+
+#include <cpptools/cppmodelmanagerinterface.h>
+#include <cpptools/uicodecompletionsupport.h>
+
+#include <QtCore/QDateTime>
+
+namespace CMakeProjectManager {
+namespace Internal {
+
+class CMakeProject;
+
+class CMakeUiCodeModelSupport : public CppTools::UiCodeModelSupport
+{
+public:
+    CMakeUiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
+                          CMakeProject *project,
+                          const QString &sourceFile,
+                          const QString &uiHeaderFile);
+    ~CMakeUiCodeModelSupport();
+protected:
+    virtual QString uicCommand() const;
+    virtual QStringList environment() const;
+private:
+    CMakeProject *m_project;
+};
+
+
+} // Internal
+} // Qt4ProjectManager
+#endif // CMAKEUICODEMODELSUPPORT_H
index 64b3627..6ca42b8 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Core" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Core" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
index 42f167d..c1fbb3e 100644 (file)
@@ -36,8 +36,8 @@ namespace Core {
 namespace Constants {
 
 #define IDE_VERSION_MAJOR 2
-#define IDE_VERSION_MINOR 0
-#define IDE_VERSION_RELEASE 91
+#define IDE_VERSION_MINOR 1
+#define IDE_VERSION_RELEASE 81
 
 #define STRINGIFY_INTERNAL(x) #x
 #define STRINGIFY(x) STRINGIFY_INTERNAL(x)
index 8805039..83acf7d 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="CodePaster" version="2.0.91" compatVersion="2.0.91">
+<plugin name="CodePaster" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -13,8 +13,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Codepaster plugin for pushing/fetching diff from server</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="Core" version="2.0.91"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="Core" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 5c489ae..ec55414 100644 (file)
@@ -1,3 +1,2 @@
-include(../../plugins/projectexplorer/projectexplorer.pri)
 include(../../plugins/texteditor/texteditor.pri)
 include(../../plugins/coreplugin/coreplugin.pri)
index ad94a1b..9c2a2b1 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="CppEditor" version="2.0.91" compatVersion="2.0.91">
+<plugin name="CppEditor" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,8 +14,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>C/C++ editor component.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="CppTools" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="CppTools" version="2.1.81"/>
     </dependencyList>
 </plugin>
index c473d1a..b62c9e5 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="CppTools" version="2.0.91" compatVersion="2.0.91">
+<plugin name="CppTools" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Tools for analyzing C/C++ code.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="Locator" version="2.0.91"/>
-        <dependency name="Find" version="2.0.91"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="Locator" version="2.1.81"/>
+        <dependency name="Find" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 8062333..be6a5cf 100644 (file)
@@ -26,6 +26,7 @@ HEADERS += completionsettingspage.h \
     cppfindreferences.h \
     cppcodeformatter.h \
     symbolsfindfilter.h \
+    uicodecompletionsupport.h \
     insertionpointlocator.h \
     cpprefactoringchanges.h
 
@@ -45,6 +46,7 @@ SOURCES += completionsettingspage.cpp \
     cppfindreferences.cpp \
     cppcodeformatter.cpp \
     symbolsfindfilter.cpp \
+    uicodecompletionsupport.cpp \
     insertionpointlocator.cpp \
     cpprefactoringchanges.cpp
 
diff --git a/src/plugins/cpptools/uicodecompletionsupport.cpp b/src/plugins/cpptools/uicodecompletionsupport.cpp
new file mode 100644 (file)
index 0000000..dc226b0
--- /dev/null
@@ -0,0 +1,197 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#include "uicodecompletionsupport.h"
+#include <QtCore/QProcess>
+
+enum { debug = 0 };
+
+using namespace CppTools;
+
+UiCodeModelSupport::UiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
+                                       const QString &source,
+                                       const QString &uiHeaderFile)
+    : CppTools::AbstractEditorSupport(modelmanager),
+      m_sourceName(source),
+      m_fileName(uiHeaderFile),
+      m_updateIncludingFiles(false),
+      m_initialized(false)
+{
+    if (debug)
+        qDebug()<<"ctor UiCodeModelSupport for"<<m_sourceName<<uiHeaderFile;
+}
+
+UiCodeModelSupport::~UiCodeModelSupport()
+{
+    if (debug)
+        qDebug()<<"dtor ~UiCodeModelSupport for"<<m_sourceName;
+}
+
+void UiCodeModelSupport::init() const
+{
+    m_initialized = true;
+    QDateTime sourceTime = QFileInfo(m_sourceName).lastModified();
+    QFileInfo uiHeaderFileInfo(m_fileName);
+    QDateTime uiHeaderTime = uiHeaderFileInfo.exists() ? uiHeaderFileInfo.lastModified() : QDateTime();
+    if (uiHeaderTime.isValid() && (uiHeaderTime > sourceTime)) {
+        QFile file(m_fileName);
+        if (file.open(QFile::ReadOnly)) {
+            if (debug)
+                qDebug()<<"ui*h file is more recent then source file, using information from ui*h file"<<m_fileName;
+            QTextStream stream(&file);
+            m_contents = stream.readAll().toUtf8();
+            m_cacheTime = uiHeaderTime;
+            return;
+        }
+    }
+
+    if (debug)
+        qDebug()<<"ui*h file not found, or not recent enough, trying to create it on the fly";
+    QFile file(m_sourceName);
+    if (file.open(QFile::ReadOnly)) {
+        QTextStream stream(&file);
+        const QString contents = stream.readAll();
+        if (runUic(contents)) {
+            if (debug)
+                qDebug()<<"created on the fly";
+            return;
+        } else {
+            // uic run was unsuccesfull
+            if (debug)
+                qDebug()<<"uic run wasn't succesfull";
+            m_cacheTime = QDateTime ();
+            m_contents = QByteArray();
+            // and if the header file wasn't there, next time we need to update
+            // all of the files that include this header
+            if (!uiHeaderFileInfo.exists())
+                m_updateIncludingFiles = true;
+            return;
+        }
+    } else {
+        if (debug)
+            qDebug()<<"Could open "<<m_sourceName<<"needed for the cpp model";
+        m_contents = QByteArray();
+    }
+}
+
+QByteArray UiCodeModelSupport::contents() const
+{
+    if (!m_initialized)
+        init();
+
+    return m_contents;
+}
+
+QString UiCodeModelSupport::fileName() const
+{
+    return m_fileName;
+}
+
+void UiCodeModelSupport::setFileName(const QString &name)
+{
+    if (m_fileName == name && m_cacheTime.isValid())
+        return;
+
+    if (debug)
+        qDebug() << "UiCodeModelSupport::setFileName"<<name;
+
+    m_fileName = name;
+    m_contents.clear();
+    m_cacheTime = QDateTime();
+    init();
+}
+
+bool UiCodeModelSupport::runUic(const QString &ui) const
+{
+    QProcess process;
+    const QString uic = uicCommand();
+    process.setEnvironment(environment());
+
+    if (debug)
+        qDebug() << "UiCodeModelSupport::runUic " << uic << " on " << ui.size() << " bytes";
+    process.start(uic, QStringList(), QIODevice::ReadWrite);
+    if (!process.waitForStarted())
+        return false;
+    process.write(ui.toUtf8());
+    process.closeWriteChannel();
+    if (process.waitForFinished() && process.exitStatus() == QProcess::NormalExit && process.exitCode() == 0) {
+        m_contents = process.readAllStandardOutput();
+        m_cacheTime = QDateTime::currentDateTime();
+        if (debug)
+            qDebug() << "ok" << m_contents.size() << "bytes.";
+        return true;
+    } else {
+        if (debug)
+            qDebug() << "failed" << process.readAllStandardError();
+        process.kill();
+    }
+    return false;
+}
+
+void UiCodeModelSupport::updateFromEditor(const QString &formEditorContents)
+{
+    if (runUic(formEditorContents)) {
+        updateDocument();
+    }
+}
+
+void UiCodeModelSupport::updateFromBuild()
+{
+    if (debug)
+        qDebug()<<"UiCodeModelSupport::updateFromBuild() for file"<<m_sourceName;
+    // This is mostly a fall back for the cases when uic couldn't be run
+    // it pays special attention to the case where a ui_*h was newly created
+    QDateTime sourceTime = QFileInfo(m_sourceName).lastModified();
+    if (m_cacheTime.isValid() && m_cacheTime >= sourceTime) {
+        if (debug)
+            qDebug()<<"Cache is still more recent then source";
+        return;
+    } else {
+        QFileInfo fi(m_fileName);
+        QDateTime uiHeaderTime = fi.exists() ? fi.lastModified() : QDateTime();
+        if (uiHeaderTime.isValid() && (uiHeaderTime > sourceTime)) {
+            if (m_cacheTime >= uiHeaderTime)
+                return;
+            if (debug)
+                qDebug()<<"found ui*h updating from it";
+
+            QFile file(m_fileName);
+            if (file.open(QFile::ReadOnly)) {
+                QTextStream stream(&file);
+                m_contents = stream.readAll().toUtf8();
+                m_cacheTime = uiHeaderTime;
+                updateDocument();
+                return;
+            }
+        }
+        if (debug)
+            qDebug()<<"ui*h not found or not more recent then source not changing anything";
+    }
+}
+
diff --git a/src/plugins/cpptools/uicodecompletionsupport.h b/src/plugins/cpptools/uicodecompletionsupport.h
new file mode 100644 (file)
index 0000000..b032949
--- /dev/null
@@ -0,0 +1,70 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+
+#ifndef UICODECOMPLETIONSUPPORT_H
+#define UICODECOMPLETIONSUPPORT_H
+
+#include "cppmodelmanagerinterface.h"
+#include "cpptools_global.h"
+
+#include <QtCore/QDateTime>
+
+namespace CppTools {
+
+class CPPTOOLS_EXPORT UiCodeModelSupport : public CppTools::AbstractEditorSupport
+{
+public:
+    UiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
+                       const QString &sourceFile,
+                       const QString &uiHeaderFile);
+    ~UiCodeModelSupport();
+    void setFileName(const QString &name);
+    void setSourceName(const QString &name);
+    virtual QByteArray contents() const;
+    virtual QString fileName() const;
+    void updateFromEditor(const QString &formEditorContents);
+    void updateFromBuild();
+protected:
+    virtual QString uicCommand() const = 0;
+    virtual QStringList environment() const = 0;
+private:
+    void init() const;
+    bool runUic(const QString &ui) const;
+    QString m_sourceName;
+    QString m_fileName;
+    mutable bool m_updateIncludingFiles;
+    mutable bool m_initialized;
+    mutable QByteArray m_contents;
+    mutable QDateTime m_cacheTime;
+};
+
+} // CppTools
+
+#endif // UICODECOMPLETIONSUPPORT_H
index 13da091..47e49e4 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="CVS" version="2.0.91" compatVersion="2.0.91">
+<plugin name="CVS" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>CVS integration.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="VCSBase" version="2.0.91"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="VCSBase" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 7fc9b7a..d2050b6 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Debugger" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Debugger" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,10 +14,10 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Debugger integration.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="CppEditor" version="2.0.91"/><!-- Debugger plugin adds items to the editor's context menu -->
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="Find" version="2.0.91"/>
+        <dependency name="CppEditor" version="2.1.81"/><!-- Debugger plugin adds items to the editor's context menu -->
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="Find" version="2.1.81"/>
     </dependencyList>
     <argumentList>
         <argument name="-disable-cdb">Disable Cdb debugger engine</argument>
index e0428f8..88c1730 100644 (file)
@@ -65,6 +65,8 @@ BreakHandler::BreakHandler(Debugger::DebuggerEngine *engine)
     //m_emptyIcon(_(":/debugger/images/debugger_empty_14.png")),
     m_watchpointIcon(_(":/debugger/images/watchpoint.png")),
     m_engine(engine),
+    m_bp(0),
+    m_masterList(false),
     m_lastFound(0),
     m_lastFoundQueried(false)
 {
@@ -73,6 +75,11 @@ BreakHandler::BreakHandler(Debugger::DebuggerEngine *engine)
 
 BreakHandler::~BreakHandler()
 {
+    if (m_bp && m_masterList) {
+        qDeleteAll(*m_bp);
+        m_bp->clear();
+        delete m_bp;
+    }
     clear();
 }
 
@@ -97,20 +104,20 @@ bool BreakHandler::hasPendingBreakpoints() const
 BreakpointData *BreakHandler::at(int index) const
 {
     QTC_ASSERT(index < size(), return 0);
-    return m_bp.at(index);
+    QTC_ASSERT(m_bp,/**/);
+    return m_bp->at(index);
 }
 
 void BreakHandler::removeAt(int index)
 {
+    QTC_ASSERT(m_bp,/**/);
     BreakpointData *data = at(index);
-    m_bp.removeAt(index);
+    m_bp->removeAt(index);
     delete data;
 }
 
 void BreakHandler::clear()
 {
-    qDeleteAll(m_bp);
-    m_bp.clear();
     m_enabled.clear();
     m_disabled.clear();
     m_removed.clear();
@@ -119,9 +126,10 @@ void BreakHandler::clear()
 
 BreakpointData *BreakHandler::findSimilarBreakpoint(const BreakpointData *needle) const
 {
+    QTC_ASSERT(m_bp, /**/);
     // Search a breakpoint we might refer to.
     for (int index = 0; index != size(); ++index) {
-        BreakpointData *data = m_bp[index];
+        BreakpointData *data = (*m_bp)[index];
         if (data->isSimilarTo(needle))
             return data;
     }
@@ -516,8 +524,9 @@ void BreakHandler::reinsertBreakpoint(BreakpointData *data)
 
 void BreakHandler::append(BreakpointData *data)
 {
+    QTC_ASSERT(m_bp,/**/);
     data->m_handler = this;
-    m_bp.append(data);
+    m_bp->append(data);
     m_inserted.append(data);
 }
 
@@ -554,8 +563,9 @@ Breakpoints BreakHandler::takeDisabledBreakpoints()
 
 void BreakHandler::removeBreakpointHelper(int index)
 {
-    BreakpointData *data = m_bp.at(index);
-    m_bp.removeAt(index);
+    QTC_ASSERT(m_bp,/**/);
+    BreakpointData *data = m_bp->at(index);
+    m_bp->removeAt(index);
     data->removeMarker();
     m_removed.append(data);
 }
@@ -570,7 +580,8 @@ void BreakHandler::removeBreakpoint(int index)
 
 void BreakHandler::removeBreakpoint(BreakpointData *data)
 {
-    removeBreakpointHelper(m_bp.indexOf(data));
+    QTC_ASSERT(m_bp,/**/);
+    removeBreakpointHelper(m_bp->indexOf(data));
     emit layoutChanged();
 }
 
@@ -614,7 +625,8 @@ void BreakHandler::removeAllBreakpoints()
 
 BreakpointData *BreakHandler::findBreakpoint(quint64 address) const
 {
-    foreach (BreakpointData *data, m_bp)
+    QTC_ASSERT(m_bp,/**/);
+    foreach (BreakpointData *data, *m_bp)
         if (data->address == address)
             return data;
     return 0;
@@ -623,7 +635,8 @@ BreakpointData *BreakHandler::findBreakpoint(quint64 address) const
 BreakpointData *BreakHandler::findBreakpoint(const QString &fileName,
     int lineNumber, bool useMarkerPosition)
 {
-    foreach (BreakpointData *data, m_bp)
+    QTC_ASSERT(m_bp,/**/);
+    foreach (BreakpointData *data, *m_bp)
         if (data->isLocatedAt(fileName, lineNumber, useMarkerPosition))
             return data;
     return 0;
@@ -633,15 +646,14 @@ void BreakHandler::toggleBreakpoint(const QString &fileName, int lineNumber,
                                     quint64 address /* = 0 */)
 {
     BreakpointData *data = 0;
-    do {
-        if (address) {
-            data = findBreakpoint(address);
-            break;
-        }
+
+    if (address) {
+        data = findBreakpoint(address);
+    } else {
         data = findBreakpoint(fileName, lineNumber, true);
         if (!data)
             data = findBreakpoint(fileName, lineNumber, false);
-    } while (false);
+    }
 
     if (data) {
         removeBreakpoint(data);
@@ -667,9 +679,19 @@ void BreakHandler::saveSessionData()
     saveBreakpoints();
 }
 
+void BreakHandler::initMasterList()
+{
+    if (m_bp) {
+        delete m_bp;
+    }
+    m_masterList = true;
+    m_bp = new Breakpoints;
+}
+
 void BreakHandler::loadSessionData()
 {
     QTC_ASSERT(m_engine->isSessionEngine(), return);
+    initMasterList();
     loadBreakpoints();
     updateMarkers();
 }
@@ -697,23 +719,33 @@ bool BreakHandler::isActive() const
     return m_engine->isActive();
 }
 
+bool BreakHandler::isMasterList() const
+{
+    return m_masterList;
+}
+
 void BreakHandler::initializeFromTemplate(BreakHandler *other)
 {
-    QTC_ASSERT(m_bp.isEmpty(), /**/);
-    foreach (BreakpointData *data, other->m_bp) {
-        append(data->clone());
-        data->removeMarker();
+    QTC_ASSERT(other->isMasterList(), /**/);
+    QTC_ASSERT(!isMasterList(), /**/);
+    QTC_ASSERT(other->m_bp,/**/);
+
+    m_bp = other->m_bp;
+    foreach(BreakpointData *data, *m_bp) {
+        if (m_engine->acceptsBreakpoint(data))
+            data->m_handler = this;
     }
-    updateMarkers();
+
 }
 
 void BreakHandler::storeToTemplate(BreakHandler *other)
 {
-    other->removeAllBreakpoints();
-    foreach (const BreakpointData *data, m_bp)
-        other->append(data->clone());
-    removeAllBreakpoints();
-    other->updateMarkers();
+    QTC_ASSERT(m_bp,/**/);
+    foreach (BreakpointData *data, *m_bp) {
+            data->m_handler = other;
+    }
+    m_bp = 0;
+
     other->saveSessionData();
 }
 
index 9a9aa30..26e4e0e 100644 (file)
@@ -64,11 +64,11 @@ public:
     QAbstractItemModel *model() { return this; }
 
     BreakpointData *at(int index) const;
-    int size() const { return m_bp.size(); }
+    int size() const { return m_bp?m_bp->size():0; }
     bool hasPendingBreakpoints() const;
     void removeAt(int index); // This also deletes the marker.
     void clear(); // This also deletes all the marker.
-    int indexOf(BreakpointData *data) { return m_bp.indexOf(data); }
+    int indexOf(BreakpointData *data) { return m_bp?m_bp->indexOf(data):-1; }
     // Find a breakpoint matching approximately the data in needle.
     BreakpointData *findSimilarBreakpoint(const BreakpointData *needle) const;
     BreakpointData *findBreakpointByNumber(int bpNumber) const;
@@ -76,6 +76,7 @@ public:
     bool watchPointAt(quint64 address) const;
     void updateMarkers();
     bool isActive() const;
+    bool isMasterList() const;
 
     Breakpoints insertedBreakpoints() const;
     void takeInsertedBreakPoint(BreakpointData *);
@@ -121,6 +122,8 @@ private:
     void removeBreakpointHelper(int index);
     void append(BreakpointData *data);
 
+    void initMasterList();
+
     const QIcon m_breakpointIcon;
     const QIcon m_disabledBreakpointIcon;
     const QIcon m_pendingBreakPointIcon;
@@ -128,12 +131,14 @@ private:
     const QIcon m_watchpointIcon;
 
     Debugger::DebuggerEngine *m_engine; // Not owned.
-    Breakpoints m_bp;
+    Breakpoints *m_bp;
     Breakpoints m_inserted; // Lately inserted breakpoints.
     Breakpoints m_removed; // Lately removed breakpoints.
     Breakpoints m_enabled; // Lately enabled breakpoints.
     Breakpoints m_disabled; // Lately disabled breakpoints.
 
+    bool m_masterList;
+
     // Hack for BreakWindow::findSimilarBreakpoint
     mutable BreakpointData *m_lastFound;
     mutable bool m_lastFoundQueried;
index 2bc8006..cbb287f 100644 (file)
 #include <coreplugin/progressmanager/futureprogress.h>
 
 #include <projectexplorer/debugginghelper.h>
-#include <projectexplorer/project.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-#include <projectexplorer/buildconfiguration.h>
-#include <projectexplorer/applicationrunconfiguration.h> // For LocalApplication*
+#include <projectexplorer/toolchain.h>
 
 #include <qt4projectmanager/qt4projectmanagerconstants.h>
 
@@ -1696,6 +1692,11 @@ void DebuggerEngine::attemptBreakpointSynchronization()
 {
 }
 
+bool DebuggerEngine::acceptsBreakpoint(const BreakpointData *)
+{
+    return true;
+}
+
 void DebuggerEngine::selectThread(int)
 {
 }
index 2753a65..199d7c6 100644 (file)
@@ -130,6 +130,7 @@ class StackFrame;
 class SourceFilesHandler;
 class ThreadsHandler;
 class WatchHandler;
+class BreakpointData;
 
 struct WatchUpdateFlags
 {
@@ -183,6 +184,7 @@ public:
     virtual void updateAll();
 
     virtual void attemptBreakpointSynchronization();
+    virtual bool acceptsBreakpoint(const Internal::BreakpointData *);
     virtual void selectThread(int index);
 
     virtual void assignValueInDebugger(const Internal::WatchData *w, const QString &expr, const QVariant &value);
index cc1c27f..61779d3 100644 (file)
@@ -2609,6 +2609,11 @@ void GdbEngine::attemptBreakpointSynchronization()
     handler->updateMarkers();
 }
 
+bool GdbEngine::acceptsBreakpoint(const Internal::BreakpointData *br)
+{
+    return !( br->fileName.endsWith(QLatin1String("js")) || br->fileName.endsWith(QLatin1String("qml")) );
+}
+
 
 //////////////////////////////////////////////////////////////////////
 //
index 210b1c6..bc9a357 100644 (file)
@@ -309,6 +309,7 @@ private: ////////// Inferior Management //////////
 
     // This should be always the last call in a function.
     Q_SLOT virtual void attemptBreakpointSynchronization();
+    bool acceptsBreakpoint(const Internal::BreakpointData *br);
 
     virtual void executeStep();
     virtual void executeStepOut();
index 1169da3..65e3287 100644 (file)
@@ -316,8 +316,9 @@ void TcfTrkGdbAdapter::tcftrkEvent(const TcfTrkEvent &e)
                 static_cast<const TcfTrkRunControlContextSuspendedEvent &>(e);
             const unsigned threadId = RunControlContext::threadIdFromTcdfId(se.id());
             const QString reason = QString::fromUtf8(se.reasonID());
-            showMessage(_("Reset snapshot (Thread 0x%1 stopped: '%2')").
-                        arg(threadId, 0, 16).arg(reason));
+            const QString message = QString::fromUtf8(se.message()).replace(QLatin1String("\n"), QLatin1String(", "));
+            showMessage(_("Thread %1 stopped: '%2': %3").
+                        arg(threadId).arg(reason, message), LogMisc);
             // Stopped in a new thread: Add.
             m_snapshot.reset();
             m_session.tid = threadId;
@@ -1041,6 +1042,7 @@ void TcfTrkGdbAdapter::setupInferior()
 
 void TcfTrkGdbAdapter::addThread(unsigned id)
 {
+    showMessage(QString::fromLatin1("Thread %1 reported").arg(id), LogMisc);
     // Make thread known, register as main if it is the first one.
     if (m_snapshot.indexOfThread(id) == -1) {
         m_snapshot.addThread(id);
index 9048931..6b232a6 100644 (file)
@@ -222,6 +222,11 @@ void QmlCppEngine::attemptBreakpointSynchronization()
     static_cast<DebuggerEngine*>(d->m_qmlEngine)->attemptBreakpointSynchronization();
 }
 
+bool QmlCppEngine::acceptsBreakpoint(const Internal::BreakpointData *br)
+{
+    return d->m_cppEngine->acceptsBreakpoint(br) || d->m_qmlEngine->acceptsBreakpoint(br);
+}
+
 void QmlCppEngine::selectThread(int index)
 {
     d->m_cppEngine->selectThread(index);
index 9bdf2a6..d3bb720 100644 (file)
@@ -52,6 +52,7 @@ public:
     virtual void updateAll();
 
     virtual void attemptBreakpointSynchronization();
+    virtual bool acceptsBreakpoint(const Internal::BreakpointData *br);
     virtual void selectThread(int index);
 
     virtual void assignValueInDebugger(const Internal::WatchData *w, const QString &expr, const QVariant &value);
index b85302b..9e1599a 100644 (file)
@@ -467,6 +467,11 @@ void QmlEngine::attemptBreakpointSynchronization()
     }
 }
 
+bool QmlEngine::acceptsBreakpoint(const Internal::BreakpointData *br)
+{
+    return (br->fileName.endsWith(QLatin1String("qml")) || br->fileName.endsWith(QLatin1String("js")));
+}
+
 void QmlEngine::loadSymbols(const QString &moduleName)
 {
     Q_UNUSED(moduleName)
index 998a183..d508787 100644 (file)
@@ -93,6 +93,7 @@ private:
     void selectThread(int index);
 
     void attemptBreakpointSynchronization();
+    bool acceptsBreakpoint(const Internal::BreakpointData *br);
 
     void assignValueInDebugger(const Internal::WatchData *w, const QString &expr, const QVariant &value);
     void loadSymbols(const QString &moduleName);
index acc3a58..3f6e81e 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Designer" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Designer" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,8 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Qt Designer integration.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
 <!-- For compiling with CPP support enabled -->
-        <dependency name="CppEditor" version="2.0.91"/>
+        <dependency name="CppTools" version="2.1.81"/>
+        <dependency name="TextEditor" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 4c98d46..f19342e 100644 (file)
@@ -1,3 +1,5 @@
-include(../../plugins/cppeditor/cppeditor.pri)
+include(../../libs/cplusplus/cplusplus.pri)
+include(../../plugins/cpptools/cpptools.pri)
+include(../../plugins/texteditor/texteditor.pri)
 include(../../libs/utils/utils.pri)
 include(../../plugins/coreplugin/coreplugin.pri)
index 9f842de..ea7c04c 100644 (file)
@@ -34,7 +34,6 @@
 
 #ifdef CPP_ENABLED
 #  include "formclasswizard.h"
-#  include <cppeditor/cppeditorconstants.h>
 #  include "cppsettingspage.h"
 #endif
 
index ec1aa49..d68f79f 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="FakeVim" version="2.0.91" compatVersion="2.0.91">
+<plugin name="FakeVim" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -13,9 +13,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>VI-style keyboard navigation.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="CppEditor" version="2.0.91"/><!-- Plugin adds items to the editor's context menu -->
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="Core" version="2.0.91"/>
+        <dependency name="CppEditor" version="2.1.81"/><!-- Plugin adds items to the editor's context menu -->
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="Core" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 39e397b..e0bbf7d 100644 (file)
@@ -400,9 +400,7 @@ public:
 
     bool is(int c) const
     {
-        return m_xkey == c && (m_modifiers == 0
-                || m_modifiers == Qt::ShiftModifier
-                || m_modifiers == Qt::GroupSwitchModifier);
+        return m_xkey == c && m_modifiers != Qt::ControlModifier;
     }
 
     bool isControl(int c) const
index f377d46..2024be5 100644 (file)
@@ -50,7 +50,6 @@
 #include <coreplugin/statusbarmanager.h>
 
 #include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/session.h>
 
 #include <texteditor/basetextdocumentlayout.h>
 #include <texteditor/basetexteditor.h>
@@ -90,8 +89,6 @@
 using namespace FakeVim::Internal;
 using namespace TextEditor;
 using namespace Core;
-using namespace ProjectExplorer;
-
 
 namespace FakeVim {
 namespace Constants {
index 2ac0f24..d9263df 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Find" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Find" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,6 +14,6 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Provides the find widget and the hooks for find implementations.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
     </dependencyList>
 </plugin>
index d939c5b..42059de 100644 (file)
@@ -329,7 +329,7 @@ void BaseTextFind::defineFindScope()
 {
     QTextCursor cursor = textCursor();
     if (cursor.hasSelection() && cursor.block() != cursor.document()->findBlock(cursor.anchor())) {
-        d->m_findScopeStart = QTextCursor(document()->docHandle(), qMax(0, cursor.selectionStart()-1));
+        d->m_findScopeStart = QTextCursor(document()->docHandle(), qMax(0, cursor.selectionStart()));
         d->m_findScopeEnd = QTextCursor(document()->docHandle(), cursor.selectionEnd());
         d->m_findScopeVerticalBlockSelectionFirstColumn = -1;
         d->m_findScopeVerticalBlockSelectionLastColumn = -1;
@@ -344,7 +344,7 @@ void BaseTextFind::defineFindScope()
         emit findScopeChanged(d->m_findScopeStart, d->m_findScopeEnd,
                               d->m_findScopeVerticalBlockSelectionFirstColumn,
                               d->m_findScopeVerticalBlockSelectionLastColumn);
-        cursor.setPosition(d->m_findScopeStart.position()+1);
+        cursor.setPosition(d->m_findScopeStart.position());
         setTextCursor(cursor);
     } else {
         clearFindScope();
index 46f5e2e..89808c9 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="GenericProjectManager" version="2.0.91" compatVersion="2.0.91">
+<plugin name="GenericProjectManager" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,9 +14,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Generic support</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="CppTools" version="2.0.91"/>
-        <dependency name="CppEditor" version="2.0.91"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="CppTools" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 80118ad..78430f8 100644 (file)
@@ -1,4 +1,3 @@
 include(../../plugins/projectexplorer/projectexplorer.pri)
 include(../../plugins/cpptools/cpptools.pri)
-include(../../plugins/cppeditor/cppeditor.pri)
 include(../../plugins/texteditor/texteditor.pri)
index 82e8b8b..f1a8758 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="ScmGit" version="2.0.91" compatVersion="2.0.91">
+<plugin name="ScmGit" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Git integration.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="VCSBase" version="2.0.91"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="VCSBase" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 40b8a49..f2b0667 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="HelloWorld" version="2.0.91" compatVersion="2.0.91" experimental="true">
+<plugin name="HelloWorld" version="2.1.81" compatVersion="2.1.81" experimental="true">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -13,6 +13,6 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Hello World sample plugin.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
     </dependencyList>
 </plugin>
index aa1238a..fc80949 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Help" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Help" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,8 +14,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Help system.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="Find" version="2.0.91"/>
-        <dependency name="Locator" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="Find" version="2.1.81"/>
+        <dependency name="Locator" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 3f4c693..d4a01b0 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="ImageViewer" version="2.0.91" compatVersion="2.0.91">
+<plugin name="ImageViewer" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Denis Mingulov</copyright>
     <license>
@@ -14,6 +14,6 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Image Viewer component.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 45e30fe..96ca314 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Locator" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Locator" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,6 +14,6 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Provides the Locator widget and the hooks for Locator filter implementations.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 8db3981..473be1f 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Mercurial" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Mercurial" version="2.1.81" compatVersion="2.1.81">
     <vendor>Brian McGillion</vendor>
     <copyright>(C) 2008-2009 Brian McGillion</copyright>
     <license>
@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Mercurial integration.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="VCSBase" version="2.0.91"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="VCSBase" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 7914a38..7229d18 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Perforce" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Perforce" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Perforce integration.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="VCSBase" version="2.0.91"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="VCSBase" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 570be94..6cbc707 100644 (file)
@@ -89,7 +89,7 @@ plugin_imageviewer.subdir = imageviewer
 plugin_imageviewer.depends = plugin_coreplugin
 
 plugin_designer.subdir = designer
-plugin_designer.depends = plugin_coreplugin plugin_cppeditor plugin_projectexplorer
+plugin_designer.depends = plugin_coreplugin plugin_cpptools plugin_projectexplorer plugin_texteditor
 
 plugin_vcsbase.subdir = vcsbase
 plugin_vcsbase.depends = plugin_find
@@ -127,8 +127,6 @@ plugin_qt4projectmanager.subdir = qt4projectmanager
 plugin_qt4projectmanager.depends = plugin_texteditor
 plugin_qt4projectmanager.depends += plugin_projectexplorer
 plugin_qt4projectmanager.depends += plugin_cpptools
-plugin_qt4projectmanager.depends += plugin_cppeditor
-plugin_qt4projectmanager.depends += plugin_qmljseditor
 plugin_qt4projectmanager.depends += plugin_designer
 plugin_qt4projectmanager.depends += plugin_debugger
 plugin_qt4projectmanager.depends += plugin_qmljseditor
@@ -183,19 +181,17 @@ plugin_regexp.depends = plugin_coreplugin
 plugin_cpaster.subdir = cpaster
 plugin_cpaster.depends = plugin_texteditor
 plugin_cpaster.depends += plugin_coreplugin
-plugin_cpaster.depends += plugin_projectexplorer
 
 plugin_cmakeprojectmanager.subdir = cmakeprojectmanager
 plugin_cmakeprojectmanager.depends = plugin_texteditor
 plugin_cmakeprojectmanager.depends += plugin_projectexplorer
 plugin_cmakeprojectmanager.depends += plugin_cpptools
-plugin_cmakeprojectmanager.depends += plugin_cppeditor
+plugin_cmakeprojectmanager.depends += plugin_designer
 
 plugin_genericprojectmanager.subdir = genericprojectmanager
 plugin_genericprojectmanager.depends = plugin_texteditor
 plugin_genericprojectmanager.depends += plugin_projectexplorer
 plugin_genericprojectmanager.depends += plugin_cpptools
-plugin_genericprojectmanager.depends += plugin_cppeditor
 
 plugin_qmljseditor.subdir = qmljseditor
 plugin_qmljseditor.depends = plugin_texteditor
index 0d52046..dceb775 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="ProjectExplorer" version="2.0.91" compatVersion="2.0.91">
+<plugin name="ProjectExplorer" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,10 +14,10 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>ProjectExplorer framework that can be extended with different kind of project types.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="Find" version="2.0.91"/>
-        <dependency name="Locator" version="2.0.91"/>
-        <dependency name="TextEditor" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="Find" version="2.1.81"/>
+        <dependency name="Locator" version="2.1.81"/>
+        <dependency name="TextEditor" version="2.1.81"/>
     </dependencyList>
     <argumentList>
         <argument name="-customwizard-verbose">Verbose loading of custom wizards</argument>
index 4dc9992..b6a2cca 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="QmlDesigner" version="2.0.91" compatVersion="2.0.91">
+<plugin name="QmlDesigner" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -20,8 +20,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
     <description>Visual Designer for QML files.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="QmlJSEditor" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="QmlJSEditor" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 42f5dd2..adc6a03 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="QmlJSEditor" version="2.0.91" compatVersion="2.0.91">
+<plugin name="QmlJSEditor" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,8 +14,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Editor for QML and JavaScript.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
     </dependencyList>
 </plugin>
index f5fa841..712c90b 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="QmlJSInspector" version="2.0.91" compatVersion="2.0.91" experimental="true">
+<plugin name="QmlJSInspector" version="2.1.81" compatVersion="2.1.81" experimental="true">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -20,11 +20,11 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
     <description>Debugger for QML files</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="QmlProjectManager" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="CppTools" version="2.0.91"/>
-        <dependency name="CppEditor" version="2.0.91"/>
-        <dependency name="Debugger" version="2.0.91"/>
-        <dependency name="QmlJSEditor" version="2.0.91"/>
+        <dependency name="QmlProjectManager" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="CppTools" version="2.1.81"/>
+        <dependency name="CppEditor" version="2.1.81"/>
+        <dependency name="Debugger" version="2.1.81"/>
+        <dependency name="QmlJSEditor" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 53ae570..8e7d1a9 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="QmlProjectManager" version="2.0.91" compatVersion="2.0.91">
+<plugin name="QmlProjectManager" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,10 +14,10 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Qt Quick support</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="QmlJSEditor" version="2.0.91"/>
-        <dependency name="Debugger" version="2.0.91" />
-        <dependency name="Qt4ProjectManager" version="2.0.91" />
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="QmlJSEditor" version="2.1.81"/>
+        <dependency name="Debugger" version="2.1.81" />
+        <dependency name="Qt4ProjectManager" version="2.1.81" />
     </dependencyList>
 </plugin>
index b53e43c..6b0e542 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Qt4ProjectManager" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Qt4ProjectManager" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,11 +14,10 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Provides project type for Qt 4 pro files and tools.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="CppTools" version="2.0.91"/>
-        <dependency name="CppEditor" version="2.0.91"/>
-        <dependency name="Designer" version="2.0.91"/>
-        <dependency name="Debugger" version="2.0.91"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="CppTools" version="2.1.81"/>
+        <dependency name="Designer" version="2.1.81"/>
+        <dependency name="Debugger" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 7d2124f..c325787 100644 (file)
@@ -1,6 +1,5 @@
 include(../../plugins/projectexplorer/projectexplorer.pri)
 include(../../plugins/cpptools/cpptools.pri)
-include(../../plugins/cppeditor/cppeditor.pri)
 include(../../plugins/qmljseditor/qmljseditor.pri)
 include(../../plugins/designer/designer.pri)
 include(../../plugins/debugger/debugger.pri)
index 695666b..d9640b2 100644 (file)
@@ -44,158 +44,25 @@ Qt4UiCodeModelSupport::Qt4UiCodeModelSupport(CppTools::CppModelManagerInterface
                                              Qt4Project *project,
                                              const QString &source,
                                              const QString &uiHeaderFile)
-    : CppTools::AbstractEditorSupport(modelmanager),
-      m_project(project),
-      m_sourceName(source),
-      m_fileName(uiHeaderFile),
-      m_updateIncludingFiles(false)
+    : CppTools::UiCodeModelSupport(modelmanager, source, uiHeaderFile),
+      m_project(project)
 {
-    if (debug)
-        qDebug()<<"ctor Qt4UiCodeModelSupport for"<<m_sourceName<<uiHeaderFile;
-    init();
-}
 
-Qt4UiCodeModelSupport::~Qt4UiCodeModelSupport()
-{
-    if (debug)
-        qDebug()<<"dtor ~Qt4UiCodeModelSupport for"<<m_sourceName;
 }
 
-void Qt4UiCodeModelSupport::init()
-{
-    QDateTime sourceTime = QFileInfo(m_sourceName).lastModified();
-    QFileInfo uiHeaderFileInfo(m_fileName);
-    QDateTime uiHeaderTime = uiHeaderFileInfo.exists() ? uiHeaderFileInfo.lastModified() : QDateTime();
-    if (uiHeaderTime.isValid() && (uiHeaderTime > sourceTime)) {
-        QFile file(m_fileName);
-        if (file.open(QFile::ReadOnly)) {
-            if (debug)
-                qDebug()<<"ui*h file is more recent then source file, using information from ui*h file"<<m_fileName;
-            QTextStream stream(&file);
-            m_contents = stream.readAll().toUtf8();
-            m_cacheTime = uiHeaderTime;
-            return;
-        }
-    }
-
-    if (debug)
-        qDebug()<<"ui*h file not found, or not recent enough, trying to create it on the fly";
-    QFile file(m_sourceName);
-    if (file.open(QFile::ReadOnly)) {
-        QTextStream stream(&file);
-        const QString contents = stream.readAll();
-        if (runUic(contents)) {
-            if (debug)
-                qDebug()<<"created on the fly";
-            return;
-        } else {
-            // uic run was unsuccesfull
-            if (debug)
-                qDebug()<<"uic run wasn't succesfull";
-            m_cacheTime = QDateTime();
-            m_contents = QByteArray();
-            // and if the header file wasn't there, next time we need to update
-            // all of the files that include this header
-            if (!uiHeaderFileInfo.exists())
-                m_updateIncludingFiles = true;
-            return;
-        }
-    } else {
-        if (debug)
-            qDebug()<<"Could open "<<m_sourceName<<"needed for the cpp model";
-        m_contents = QByteArray();
-    }
-}
-
-QByteArray Qt4UiCodeModelSupport::contents() const
-{
-    return m_contents;
-}
-
-QString Qt4UiCodeModelSupport::fileName() const
-{
-    return m_fileName;
-}
-
-void Qt4UiCodeModelSupport::setFileName(const QString &name)
+Qt4UiCodeModelSupport::~Qt4UiCodeModelSupport()
 {
-    if (m_fileName == name && m_cacheTime.isValid())
-        return;
 
-    if (debug)
-        qDebug() << "Qt4UiCodeModelSupport::setFileName"<<name;
-
-    m_fileName = name;
-    m_contents.clear();
-    m_cacheTime = QDateTime();
-    init();
 }
 
-bool Qt4UiCodeModelSupport::runUic(const QString &ui) const
+QString Qt4UiCodeModelSupport::uicCommand() const
 {
     Qt4BuildConfiguration *qt4bc = m_project->activeTarget()->activeBuildConfiguration();
-    QProcess uic;
-    uic.setEnvironment(qt4bc->environment().toStringList());
-    const QString uicCommand = qt4bc->qtVersion()->uicCommand();
-    if (debug)
-        qDebug() << "Qt4UiCodeModelSupport::runUic " << uicCommand << " on " << ui.size() << " bytes";
-    uic.start(uicCommand, QStringList(), QIODevice::ReadWrite);
-    if (!uic.waitForStarted())
-        return false;
-    uic.write(ui.toUtf8());
-    uic.closeWriteChannel();
-    if (uic.waitForFinished() && uic.exitStatus() == QProcess::NormalExit && uic.exitCode() == 0) {
-        m_contents = uic.readAllStandardOutput();
-        m_cacheTime = QDateTime::currentDateTime();
-        if (debug)
-            qDebug() << "ok" << m_contents.size() << "bytes.";
-        return true;        
-    } else {
-        if (debug)
-            qDebug() << "failed" << uic.readAllStandardError();
-        uic.kill();
-    }
-    return false;
-}
-
-void Qt4UiCodeModelSupport::updateFromEditor(const QString &formEditorContents)
-{
-    if (runUic(formEditorContents)) {
-        updateDocument();
-    }
+    return qt4bc->qtVersion()->uicCommand();
 }
 
-void Qt4UiCodeModelSupport::updateFromBuild()
+QStringList Qt4UiCodeModelSupport::environment() const
 {
-    if (debug)
-        qDebug()<<"Qt4UiCodeModelSupport::updateFromBuild() for file"<<m_sourceName;
-    // This is mostly a fall back for the cases when uic couldn't be run
-    // it pays special attention to the case where a ui_*h was newly created
-    QDateTime sourceTime = QFileInfo(m_sourceName).lastModified();
-    if (m_cacheTime.isValid() && m_cacheTime >= sourceTime) {
-        if (debug)
-            qDebug()<<"Cache is still more recent then source";
-        return;
-    } else {
-        QFileInfo fi(m_fileName);
-        QDateTime uiHeaderTime = fi.exists() ? fi.lastModified() : QDateTime();
-        if (uiHeaderTime.isValid() && (uiHeaderTime > sourceTime)) {
-            if (m_cacheTime >= uiHeaderTime)
-                return;
-            if (debug)
-                qDebug()<<"found ui*h updating from it";
-
-            QFile file(m_fileName);
-            if (file.open(QFile::ReadOnly)) {
-                QTextStream stream(&file);
-                m_contents = stream.readAll().toUtf8();
-                m_cacheTime = uiHeaderTime;
-                updateDocument();
-                return;
-            }
-        }
-        if (debug)
-            qDebug()<<"ui*h not found or not more recent then source not changing anything";
-    }
+    Qt4BuildConfiguration *qt4bc = m_project->activeTarget()->activeBuildConfiguration();
+    return qt4bc->environment().toStringList();
 }
-
index 8f75361..b938009 100644 (file)
@@ -31,6 +31,7 @@
 #define QTUICODEMODELSUPPORT_H
 
 #include <cpptools/cppmodelmanagerinterface.h>
+#include <cpptools/uicodecompletionsupport.h>
 
 #include <QtCore/QDateTime>
 
@@ -38,7 +39,7 @@ namespace Qt4ProjectManager {
 class Qt4Project;
 namespace Internal {
 
-class Qt4UiCodeModelSupport : public CppTools::AbstractEditorSupport
+class Qt4UiCodeModelSupport : public CppTools::UiCodeModelSupport
 {
 public:
     Qt4UiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
@@ -46,21 +47,11 @@ public:
                           const QString &sourceFile,
                           const QString &uiHeaderFile);
     ~Qt4UiCodeModelSupport();
-    void setFileName(const QString &name);
-    void setSourceName(const QString &name);
-    virtual QByteArray contents() const;
-    virtual QString fileName() const;
-    void updateFromEditor(const QString &formEditorContents);
-    void updateFromBuild();
+protected:
+    virtual QString uicCommand() const;
+    virtual QStringList environment() const;
 private:
-    void init();
-    bool runUic(const QString &ui) const;
     Qt4Project *m_project;
-    QString m_sourceName;
-    QString m_fileName;
-    mutable bool m_updateIncludingFiles;
-    mutable QByteArray m_contents;
-    mutable QDateTime m_cacheTime;
 };
 
 
index dc9bd1f..bd03106 100644 (file)
@@ -138,7 +138,7 @@ QString MobileApp::mainWindowClassName() const
 
 int MobileApp::stubVersionMinor() const { return StubVersion; }
 
-const int MobileApp::StubVersion = 1;
+const int MobileApp::StubVersion = 2;
 
 } // namespace Internal
 } // namespace Qt4ProjectManager
index d38b989..79fbdde 100644 (file)
@@ -91,11 +91,10 @@ void MobileLibraryParameters::writeProFile(QTextStream &str) const
 void MobileLibraryParameters::writeSymbianProFile(QTextStream &str) const
 {
     if (libraryType != QtProjectParameters::SharedLibrary)
-        return; //nothing to do when the library is not shared library
+        return; //nothing to do when the library is not shared library
 
     str << "\n"
            "symbian {\n"
-           "    #Symbian specific definitions\n"
            "    MMP_RULES += EXPORTUNFROZEN\n"
            "    TARGET.UID3 = " + symbianUid + "\n"
            "    TARGET.CAPABILITY = " + generateCapabilitySet(symbianCapabilities).toAscii() + "\n"
@@ -108,7 +107,8 @@ void MobileLibraryParameters::writeSymbianProFile(QTextStream &str) const
 
 void MobileLibraryParameters::writeMaemoProFile(QTextStream &str) const
 {
-    str << " else:unix {\n"
+    str << "\n"
+           "unix:!symbian {\n"
            "    maemo5 {\n"
            "        target.path = /opt/usr/lib\n"
            "    } else {\n"
index d428912..d23b473 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="RegExp" version="2.0.91" compatVersion="2.0.91">
+<plugin name="RegExp" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -13,6 +13,6 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Regular Expression test widget.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 7a5905f..e7ecf2e 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="ResourceEditor" version="2.0.91" compatVersion="2.0.91">
+<plugin name="ResourceEditor" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,6 +14,6 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Editor for qrc files.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 8cca420..83d38cc 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Snippets" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Snippets" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -13,8 +13,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Code snippet plugin.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 87ab8a7..67e1e26 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Subversion" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Subversion" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Subversion integration.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="VCSBase" version="2.0.91"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="VCSBase" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 5115be8..b1a8eca 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="TaskList" version="2.0.91" compatVersion="2.0.91">
+<plugin name="TaskList" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -13,7 +13,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Use .tasks-files to populate the build issues view.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
-       <dependency name="ProjectExplorer" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
+       <dependency name="ProjectExplorer" version="2.1.81"/>
     </dependencyList>
 </plugin>
index b366d51..1670ce1 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="TextEditor" version="2.0.91" compatVersion="2.0.91">
+<plugin name="TextEditor" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,8 +14,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Text editor framework and the implementation of the basic text editor.</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="Find" version="2.0.91"/>
-        <dependency name="Locator" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="Find" version="2.1.81"/>
+        <dependency name="Locator" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 4fbe7d2..7ee1175 100644 (file)
@@ -171,10 +171,10 @@ QPainterPath TextEditorOverlay::createSelectionPath(const QTextCursor &begin, co
                 inSelection = true;
                 firstOrLastBlock = true;
             } else {
-                while (beginChar < block.length() && document->characterAt(block.position() + beginChar).isSpace())
-                    ++beginChar;
-                if (beginChar == block.length())
-                    beginChar = 0;
+//                while (beginChar < block.length() && document->characterAt(block.position() + beginChar).isSpace())
+//                    ++beginChar;
+//                if (beginChar == block.length())
+//                    beginChar = 0;
             }
 
             int lastLine = blockLayout->lineCount()-1;
index 341c6ce..ee142de 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="VCSBase" version="2.0.91" compatVersion="2.0.91">
+<plugin name="VCSBase" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,8 +14,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Version Control System Base Plugin</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
-        <dependency name="TextEditor" version="2.0.91"/>
-        <dependency name="ProjectExplorer" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
+        <dependency name="TextEditor" version="2.1.81"/>
+        <dependency name="ProjectExplorer" version="2.1.81"/>
     </dependencyList>
 </plugin>
index da82737..6079634 100644 (file)
@@ -33,7 +33,6 @@
 #include "checkoutjobs.h"
 
 #include <projectexplorer/projectexplorer.h>
-#include <projectexplorer/session.h>
 
 #include <QtCore/QCoreApplication>
 #include <QtCore/QFileInfo>
index 386d92f..1b4c174 100644 (file)
@@ -1,4 +1,4 @@
-<plugin name="Welcome" version="2.0.91" compatVersion="2.0.91">
+<plugin name="Welcome" version="2.1.81" compatVersion="2.1.81">
     <vendor>Nokia Corporation</vendor>
     <copyright>(C) 2010 Nokia Corporation</copyright>
     <license>
@@ -14,6 +14,6 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <description>Default Welcome Screen Plugin</description>
     <url>http://qt.nokia.com</url>
     <dependencyList>
-        <dependency name="Core" version="2.0.91"/>
+        <dependency name="Core" version="2.1.81"/>
     </dependencyList>
 </plugin>
index 1d7e966..3042a62 100644 (file)
@@ -88,6 +88,7 @@ QByteArray JsonValue::parseNumber(const char *&from, const char *to)
 QByteArray JsonValue::parseCString(const char *&from, const char *to)
 {
     QByteArray result;
+    const char * const fromSaved = from;
     JDEBUG("parseCString: " << QByteArray(from, to - from));
     if (*from != '"') {
         qDebug() << "JSON Parse Error, double quote expected";
@@ -105,7 +106,8 @@ QByteArray JsonValue::parseCString(const char *&from, const char *to)
         if (*ptr == '\\') {
             ++ptr;
             if (ptr == to) {
-                qDebug() << "JSON Parse Error, unterminated backslash escape";
+                qWarning("JSON Parse Error, unterminated backslash escape in '%s'",
+                         QByteArray(fromSaved, to - fromSaved).constData());
                 from = ptr; // So we don't hang
                 return QByteArray();
             }
@@ -130,8 +132,24 @@ QByteArray JsonValue::parseCString(const char *&from, const char *to)
                 case 'v': *dst++ = '\v'; break;
                 case '"': *dst++ = '"'; break;
                 case '\\': *dst++ = '\\'; break;
-                default:
-                    {
+                case 'u':  { // 4 digit hex escape as in '\u000a'
+                    if (end - src < 4) {
+                        qWarning("JSON Parse Error, too few hex digits in \\u-escape in '%s' obtained from '%s'",
+                                 result.constData(), QByteArray(fromSaved, to - fromSaved).constData());
+                        return QByteArray();
+                    }
+                    bool ok;
+                    const uchar prod = QByteArray(src, 4).toUInt(&ok, 16);
+                    if (!ok) {
+                        qWarning("JSON Parse Error, invalid hex digits in \\u-escape in '%s' obtained from '%s'",
+                                  result.constData(), QByteArray(fromSaved, to - fromSaved).constData());
+                         return QByteArray();
+                    }
+                    *dst++ = prod;
+                    src += 4;
+            }
+                    break;
+                default: { // Up to 3 decimal digits: Not sure if this is supported in JSON?
                         int chars = 0;
                         uchar prod = 0;
                         forever {
@@ -145,7 +163,8 @@ QByteArray JsonValue::parseCString(const char *&from, const char *to)
                             c = *src++;
                         }
                         if (!chars) {
-                            qDebug() << "JSON Parse Error, unrecognized backslash escape";
+                            qWarning("JSON Parse Error, unrecognized backslash escape in string '%s' obtained from '%s'",
+                                     result.constData(), QByteArray(fromSaved, to - fromSaved).constData());
                             return QByteArray();
                         }
                         *dst++ = prod;
index 7b0822a..201fce1 100644 (file)
@@ -383,14 +383,20 @@ TcfTrkEvent *TcfTrkEvent::parseEvent(Services s, const QByteArray &nameBA, const
             const QByteArray idBA = values.at(0).data();
             const quint64 pc = values.at(1).data().toULongLong();
             const QByteArray reasonBA = values.at(2).data();
+            QByteArray messageBA;
             // Module load: Special
             if (reasonBA == sharedLibrarySuspendReasonC) {
                 ModuleLoadEventInfo info;
                 if (!info.parse(values.at(3)))
                     return 0;
                 return new TcfTrkRunControlModuleLoadContextSuspendedEvent(idBA, reasonBA, pc, info);
+            } else {
+                // hash containing a 'message'-key with a verbose crash message.
+                if (values.at(3).type() == JsonValue::Object && values.at(3).childCount()
+                    && values.at(3).children().at(0).type() == JsonValue::String)
+                    messageBA = values.at(3).children().at(0).data();
             }
-            return new TcfTrkRunControlContextSuspendedEvent(idBA, reasonBA, pc);
+            return new TcfTrkRunControlContextSuspendedEvent(idBA, reasonBA, messageBA, pc);
         } // "contextSuspended"
         if (nameBA == "contextAdded")
             return TcfTrkRunControlContextAddedEvent::parseEvent(values);
@@ -505,8 +511,9 @@ QString TcfTrkRunControlContextRemovedEvent::toString() const
 // --------------- TcfTrkRunControlContextSuspendedEvent
 TcfTrkRunControlContextSuspendedEvent::TcfTrkRunControlContextSuspendedEvent(const QByteArray &id,
                                                                              const QByteArray &reason,
+                                                                             const QByteArray &message,
                                                                              quint64 pc) :
-        TcfTrkIdEvent(RunControlSuspended, id), m_pc(pc), m_reason(reason)
+        TcfTrkIdEvent(RunControlSuspended, id), m_pc(pc), m_reason(reason), m_message(message)
 {
 }
 
@@ -524,6 +531,8 @@ void TcfTrkRunControlContextSuspendedEvent::format(QTextStream &str) const
     str << "RunControl: '" << idString()  << "' suspended at 0x"
             << m_pc << ": '" << m_reason << "'.";
     str.setIntegerBase(10);
+    if (!m_message.isEmpty())
+        str << " (" <<m_message << ')';
 }
 
 QString TcfTrkRunControlContextSuspendedEvent::toString() const
index 1353494..e257a88 100644 (file)
@@ -262,12 +262,14 @@ public:
 
     explicit TcfTrkRunControlContextSuspendedEvent(const QByteArray &id,
                                                    const QByteArray &reason,
+                                                   const QByteArray &message,
                                                    quint64 pc = 0);
     virtual QString toString() const;
 
     quint64 pc() const { return m_pc; }
     QByteArray reasonID() const { return m_reason; }
     Reason reason() const;
+    QByteArray message() const { return m_message; }
 
 protected:
     explicit TcfTrkRunControlContextSuspendedEvent(Type t,
@@ -279,6 +281,7 @@ protected:
 private:
     const quint64 m_pc;
     const QByteArray m_reason;
+    const QByteArray m_message;
 };
 
 // RunControlContextSuspended due to module load
diff --git a/src/tools/qml/qmldom/main.cpp b/src/tools/qml/qmldom/main.cpp
deleted file mode 100644 (file)
index ef7556b..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** Commercial Usage
-**
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Nokia.
-**
-** 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.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-**
-**************************************************************************/
-
-#include <QtCore/QDebug>
-#include <QtCore/QtCore>
-#include <QtCore/QCoreApplication>
-
-#include <QtDeclarative/QmlDomDocument>
-#include <QtDeclarative/QmlEngine>
-
-#define SPACING (QString("    "))
-
-const char* getDefault(const QmlDomProperty& prop)
-{
-    if (prop.isDefaultProperty())
-        return " (default property)";
-    else
-        return "";
-}
-
-void dumpList(const QmlDomList& list, const QString& indent);
-void dumpTree(const QmlDomObject& domObject, const QString& indent);
-
-void dumpProperty(const QmlDomProperty& prop, const QString& indent)
-{
-    const QmlDomValue val(prop.value());
-
-    switch (val.type()) {
-        case QmlDomValue::Invalid:
-            qDebug() << indent.toAscii().data() << prop.propertyName() << "(invalid)" << getDefault(prop);
-            break;
-
-        case QmlDomValue::List:
-            qDebug() << indent.toAscii().data() << prop.propertyName() << "(list)" << getDefault(prop);
-            dumpList(val.toList(), indent + SPACING);
-            break;
-
-        case QmlDomValue::Literal:
-            qDebug() << indent.toAscii().data() << prop.propertyName() << "->" << val.toLiteral().literal() << "(literal)" << getDefault(prop);
-            break;
-
-        case QmlDomValue::Object:
-            qDebug() << indent.toAscii().data() << prop.propertyName() << "->" << val.toObject().objectId() << "(object)" << getDefault(prop);
-            dumpTree(val.toObject(), indent + SPACING);
-            break;
-
-        case QmlDomValue::PropertyBinding:
-            qDebug() << indent.toAscii().data() << prop.propertyName() << "->" << val.toBinding().binding() << "(property binding)" << getDefault(prop);
-            break;
-
-        case QmlDomValue::ValueSource:
-            qDebug() << indent.toAscii().data() << prop.propertyName() << "->" << val.toValueSource().object().objectId() << "(value source)" << getDefault(prop);
-            break;
-
-        default:
-            qDebug() << indent.toAscii().data() << prop.propertyName() << "(unknown)" << getDefault(prop);
-            break;
-    }
-}
-
-void dumpList(const QmlDomList& list, const QString& indent)
-{
-    foreach (const QmlDomValue& val, list.values()) {
-        switch (val.type()) {
-            case QmlDomValue::Invalid:
-                qDebug() << indent.toAscii().data() << "(invalid)";
-                break;
-
-            case QmlDomValue::List:
-                qDebug() << indent.toAscii().data() << "(list)";
-                dumpList(val.toList(), indent + SPACING);
-                break;
-
-            case QmlDomValue::Literal:
-                qDebug() << indent.toAscii().data() << val.toLiteral().literal() << "(literal)";
-                break;
-
-            case QmlDomValue::Object:
-                qDebug() << indent.toAscii().data() << val.toObject().objectId() << "(object)";
-                dumpTree(val.toObject(), indent + SPACING);
-                break;
-
-            case QmlDomValue::PropertyBinding:
-                qDebug() << indent.toAscii().data() << val.toBinding().binding() << "(property binding)";
-                break;
-
-            case QmlDomValue::ValueSource:
-                qDebug() << indent.toAscii().data() << val.toValueSource().object().objectId() << "(value source)";
-                break;
-
-            default:
-                qDebug() << indent.toAscii().data() << "(unknown)";
-                break;
-        }
-    }
-}
-
-void dumpTree(const QmlDomObject& domObject, const QString& indent)
-{
-    qDebug() << (indent + "Object ID:").toAscii().data() << domObject.objectId() <<"Type: "<<domObject.objectType()<< "Class: " << domObject.objectClassName() << "Url: " << domObject.url().toString();
-
-    if (domObject.isComponent()) {
-        QString indent2 = indent + SPACING;
-        qDebug() << (indent2 + "isComponent").toAscii().data();
-        QmlDomComponent component = domObject.toComponent();
-        dumpTree(component.componentRoot(), indent2);
-    } else {
-        foreach (const QmlDomProperty& prop, domObject.properties()) {
-            QString indent2 = indent + SPACING;
-            dumpProperty(prop, indent2);
-        }
-    }
-}
-
-int main(int argc, char *argv[])
-{
-    QCoreApplication a(argc, argv);
-
-    QByteArray qml;
-
-    QStringList args = a.arguments();
-    args.removeFirst();
-    if (args.size() != 1) {
-        qDebug() << "add file name";
-        return -2;
-    }
-
-    QFile f(args.at(0));
-    if (!f.open(QFile::ReadOnly)) { qDebug() << "cannot open file" << args.at(0); return -3;}
-    qml = f.readAll();
-
-    QmlEngine engine;
-    QmlDomDocument doc;
-    if (!doc.load(&engine, qml, QUrl::fromLocalFile(QFileInfo(f.fileName()).absoluteFilePath()))) {
-        foreach (const QmlError &error, doc.errors())
-            qDebug() << QString("Error in %1, %2:%3: %4").arg(error.url().toString()).arg(error.line()).arg(error.column()).arg(error.description());
-        return -1;
-    }
-
-    qDebug() << "---------------------------";
-
-    foreach (const QmlDomImport &import, doc.imports())
-        qDebug() << "Import type " << (import.type() == QmlDomImport::Library ? "Library" : "File")
-                << "uri" << import.uri() << "qualifier" << import.qualifier() << "version" << import.version();
-    dumpTree(doc.rootObject(), "");
-    return 0;
-}
diff --git a/src/tools/qml/qmldom/qmldom.pro b/src/tools/qml/qmldom/qmldom.pro
deleted file mode 100644 (file)
index 47b5aa4..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2009-04-09T15:54:21
-#
-#-------------------------------------------------
-
-!contains(QT_CONFIG, declarative) {
-    error("Qt is not configured with the declarative model.");
-}
-
-QT       -= gui
-QT += declarative
-
-TARGET = qmldom
-CONFIG   += console
-CONFIG   -= app_bundle
-
-TEMPLATE = app
-
-
-SOURCES += main.cpp
diff --git a/src/tools/qml/qmlmetatype/main.cpp b/src/tools/qml/qmlmetatype/main.cpp
deleted file mode 100644 (file)
index b6bf7cc..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDebug>
-#include <QtCore/QMetaObject>
-#include <QtCore/QMetaProperty>
-#include <QtDeclarative/QmlMetaType>
-
- void messageOutput(QtMsgType type, const char *msg)
- {
-     switch (type) {
-     case QtDebugMsg:
-         fprintf(stdout, "%s\n", msg);
-         break;
-     case QtWarningMsg:
-         fprintf(stderr, "Warning: %s\n", msg);
-         break;
-     case QtCriticalMsg:
-         fprintf(stderr, "Critical: %s\n", msg);
-         break;
-     case QtFatalMsg:
-         fprintf(stderr, "Fatal: %s\n", msg);
-         abort();
-     }
- }
-void dumpProperty(QMetaProperty qProperty)
-{
-    qDebug() << "\t\t" << qProperty.name()  << "\t\t"
-                       << qProperty.typeName()
-                       << "readable=" << qProperty.isReadable()
-                       << "writable=" << qProperty.isWritable()
-                       << "resettable=" << qProperty.isResettable();
-}
-
-void dumpType(QmlType *type)
-{
-    qDebug() << "Type:" << type->qmlTypeName() << type->majorVersion() << type->minorVersion() << "(C++: " << type->typeName() << ")";
-
-    const QMetaObject *qMetaObject = type->metaObject();
-    if (!qMetaObject) {
-        qDebug() << "\tNo metaObject! Skipping ...";
-        return;
-    }
-
-    qDebug() << "\tProperties (default property :" << QmlMetaType::defaultProperty(qMetaObject).typeName() << ")";
-    for (int i = 0; i < qMetaObject->propertyCount(); ++i) {
-        dumpProperty(qMetaObject->property(i));
-    }
-
-    qDebug() << "\tSuper Classes:";
-    if (qMetaObject->superClass()) {
-        if (QmlType *qmlParentType = QmlMetaType::qmlType(qMetaObject->superClass())) {
-            if (!qmlParentType->qmlTypeName().isEmpty()) {
-                qDebug() << "\t\t" << qmlParentType->qmlTypeName();
-            } else {
-                qDebug() << "\t\t" << "(no Qml Type name)" << qmlParentType->typeName();
-            }
-        } else {
-            const QString parentClass = qMetaObject->superClass()->className();
-            qDebug() << "\t\t" << "(no Qml Type)" << parentClass;
-        }
-    } else {
-        qDebug() << "\t\t" << "no superclass";
-    }
-}
-
-int main(int argc, char **argv)
-{
-    QCoreApplication app(argc, argv);
-
-    qInstallMsgHandler(messageOutput);
-
-    qDebug() << "Registered qml meta types:\n\n";
-    foreach (const QByteArray &typeName, QmlMetaType::qmlTypeNames()) {
-        if (typeName.isEmpty()) {
-            qDebug() << "Empty type name!!! Skipping ...";
-            continue;
-        }
-        QmlType *qmlType = QmlMetaType::qmlType(typeName, 4, 6);
-        Q_ASSERT(qmlType);
-        dumpType(qmlType);
-    }
-    return 0;
-}
diff --git a/src/tools/qml/qmlmetatype/qmlmetatype.pro b/src/tools/qml/qmlmetatype/qmlmetatype.pro
deleted file mode 100644 (file)
index da49ff0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2009-04-09T15:54:21
-#
-#-------------------------------------------------
-
-QT       -= gui
-QT += declarative
-
-TARGET = qmlmetatype
-CONFIG   += console
-CONFIG   -= app_bundle
-
-TEMPLATE = app
-
-
-SOURCES += main.cpp
index f89b4c6..f662f2c 100644 (file)
@@ -2,4 +2,5 @@ DEFINES+=CPLUSPLUS_BUILD_STATIC_LIB
 include(../../../../qtcreator.pri)
 INCLUDEPATH += $$IDE_SOURCE_TREE/src/libs/cplusplus
 INCLUDEPATH += $$IDE_SOURCE_TREE/src/shared/cplusplus
-include($$PWD/../../../../src/libs/cplusplus/cplusplus-lib.pri)
+include($$IDE_SOURCE_TREE/src/libs/cplusplus/cplusplus-lib.pri)
+include($$IDE_SOURCE_TREE/src/libs/utils/utils-lib.pri)
index d3a2044..083a32e 100644 (file)
@@ -3,6 +3,8 @@ CONFIG += qtestlib testcase
 # Defines import symbol as empty
 DEFINES+=QTCREATOR_UTILS_STATIC_LIB
 
+include(../../../src/libs/utils/utils-lib.pri)
+
 FAKEVIMDIR = ../../../src/plugins/fakevim
 UTILSDIR = ../../../src/libs
 
@@ -10,17 +12,11 @@ SOURCES += \
        $$FAKEVIMDIR/fakevimhandler.cpp \
        $$FAKEVIMDIR/fakevimactions.cpp \
        $$FAKEVIMDIR/fakevimsyntax.cpp \
-       $$UTILSDIR/utils/savedaction.cpp \
-       $$UTILSDIR/utils/pathchooser.cpp \
-       $$UTILSDIR/utils/basevalidatinglineedit.cpp \
         tst_fakevim.cpp
 
 HEADERS += \
        $$FAKEVIMDIR/fakevimhandler.h \
        $$FAKEVIMDIR/fakevimactions.h \
        $$FAKEVIMDIR/fakevimsyntax.h \
-       $$UTILSDIR/utils/savedaction.h \
-       $$UTILSDIR/utils/pathchooser.h \
-       $$UTILSDIR/utils/basevalidatinglineedit.h \
 
 INCLUDEPATH += $$FAKEVIMDIR $$UTILSDIR
index b6a8877..b36e534 100644 (file)
@@ -1,24 +1,20 @@
-
 FAKEVIMHOME = ../../../src/plugins/fakevim
 UTILSDIR = ../../../src/libs
 
 DEFINES += QTCREATOR_UTILS_STATIC_LIB
+
+include(../../../src/libs/utils/utils-lib.pri)
+
 SOURCES += \
        main.cpp \
        $$FAKEVIMHOME/fakevimhandler.cpp \
        $$FAKEVIMHOME/fakevimactions.cpp \
-       $$FAKEVIMHOME/fakevimsyntax.cpp \
-       $$UTILSDIR/utils/savedaction.cpp \
-       $$UTILSDIR/utils/pathchooser.cpp \
-       $$UTILSDIR/utils/basevalidatinglineedit.cpp \
+        $$FAKEVIMHOME/fakevimsyntax.cpp
 
 HEADERS += \
        $$FAKEVIMHOME/fakevimhandler.h \
        $$FAKEVIMHOME/fakevimactions.h \
-       $$FAKEVIMHOME/fakevimsyntax.h \
-       $$UTILSDIR/utils/savedaction.h \
-       $$UTILSDIR/utils/pathchooser.h \
-       $$UTILSDIR/utils/basevalidatinglineedit.h \
+        $$FAKEVIMHOME/fakevimsyntax.h
 
 INCLUDEPATH += $$FAKEVIMHOME $$UTILSDIR
 
index fb7b6b9..9e2bc9e 100644 (file)
@@ -61,6 +61,8 @@
 #include <QtGui/QPainterPath>
 #include <QtGui/QRegion>
 #include <QtGui/QStandardItemModel>
+#include <QtGui/QTextCursor>
+#include <QtGui/QTextDocument>
 
 #include <QtNetwork/QHostAddress>
 
@@ -1421,6 +1423,20 @@ private:
     int m_id;
 };
 
+void testQTextCursor()
+{
+    //int argc = 0;
+    //char *argv[] = { "xxx", 0 };
+    //QApplication app(argc, argv);
+    QTextDocument doc;
+    doc.setPlainText("Hallo\nWorld");
+    QTextCursor tc = doc.find("all");
+    int pos = tc.position();
+    int anc = tc.anchor();
+    Q_UNUSED(pos);
+    Q_UNUSED(anc);
+}
+
 void testQThread()
 {
     Thread thread1(1);
@@ -2023,6 +2039,7 @@ int main(int argc, char *argv[])
     testFunction();
     testQImage();
     testNoArgumentName(1, 2, 3);
+    testQTextCursor();
     testInput();
     testOutput();
     testHidden();
index 3a17c43..46f7460 100644 (file)
@@ -27,12 +27,12 @@ public:
         if (m_connection->createSftpChannel())
             qDebug("Error: Unconnected SSH connection creates SFTP channel.");
 
-        SshConnectionParameters noHost;
+        SshConnectionParameters noHost=SshConnectionParameters(SshConnectionParameters::DefaultProxy);
         noHost.host = QLatin1String("hgdfxgfhgxfhxgfchxgcf");
         noHost.port = 12345;
         noHost.timeout = 10;
 
-        SshConnectionParameters noUser;
+        SshConnectionParameters noUser=SshConnectionParameters(SshConnectionParameters::DefaultProxy);
         noUser.host = QLatin1String("localhost");
         noUser.port = 22;
         noUser.timeout = 30;
@@ -40,7 +40,7 @@ public:
         noUser.uname = QLatin1String("dumdidumpuffpuff");
         noUser.uname = QLatin1String("whatever");
 
-        SshConnectionParameters wrongPwd;
+        SshConnectionParameters wrongPwd=SshConnectionParameters(SshConnectionParameters::DefaultProxy);
         wrongPwd.host = QLatin1String("localhost");
         wrongPwd.port = 22;
         wrongPwd.timeout = 30;
@@ -48,7 +48,7 @@ public:
         wrongPwd.uname = QLatin1String("root");
         noUser.uname = QLatin1String("thiscantpossiblybeapasswordcanit");
 
-        SshConnectionParameters invalidKeyFile;
+        SshConnectionParameters invalidKeyFile=SshConnectionParameters(SshConnectionParameters::DefaultProxy);
         invalidKeyFile.host = QLatin1String("localhost");
         invalidKeyFile.port = 22;
         invalidKeyFile.timeout = 30;