-Qt Creator 2.0.91
+Qt Creator 2.1.81
===============
Qt Creator is a crossplatform C++ IDE for development with the Qt framework.
" </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" \
\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
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 \
# 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
# 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
<description>%Description%</description>
<url>%URL%</url>
<dependencyList>
- <dependency name="Core" version="2.0.91"/>
+ <dependency name="Core" version="2.1.81"/>
</dependencyList>
</plugin>
<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>
}
INCLUDEPATH += $$PWD
+QT += network
SOURCES += $$PWD/environment.cpp \
$$PWD/reloadpromptutils.cpp \
-<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>
<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>
-<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>
<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>
-<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>
<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>
-<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>
<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>
#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>
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);
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;
}
// 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;
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;
}
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)
#include <projectexplorer/filewatcher.h>
#include <projectexplorer/buildconfiguration.h>
#include <coreplugin/ifile.h>
+#include <coreplugin/editormanager/ieditor.h>
#include <QtCore/QXmlStreamReader>
#include <QtGui/QPushButton>
class CMakeFile;
class CMakeBuildSettingsWidget;
+class CMakeUiCodeModelSupport;
struct CMakeBuildTarget
{
bool parseCMakeLists();
+ QString uicCommand() const;
+
signals:
/// emitted after parsing
void buildTargetsChanged();
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;
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
cmakebuildconfiguration.h \
cmakeeditorfactory.h \
cmakeeditor.h \
- cmakehighlighter.h
+ cmakehighlighter.h \
+ cmakeuicodemodelsupport.h
SOURCES = cmakeproject.cpp \
cmakeprojectplugin.cpp \
cmakeprojectmanager.cpp \
cmakebuildconfiguration.cpp \
cmakeeditorfactory.cpp \
cmakeeditor.cpp \
- cmakehighlighter.cpp
+ cmakehighlighter.cpp \
+ cmakeuicodemodelsupport.cpp
RESOURCES += cmakeproject.qrc
FORMS +=
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)
--- /dev/null
+/**************************************************************************
+**
+** 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();
+}
--- /dev/null
+/**************************************************************************
+**
+** 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
-<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>
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)
-<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>
<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>
-include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../plugins/texteditor/texteditor.pri)
include(../../plugins/coreplugin/coreplugin.pri)
-<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>
<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>
-<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>
<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>
cppfindreferences.h \
cppcodeformatter.h \
symbolsfindfilter.h \
+ uicodecompletionsupport.h \
insertionpointlocator.h \
cpprefactoringchanges.h
cppfindreferences.cpp \
cppcodeformatter.cpp \
symbolsfindfilter.cpp \
+ uicodecompletionsupport.cpp \
insertionpointlocator.cpp \
cpprefactoringchanges.cpp
--- /dev/null
+/**************************************************************************
+**
+** 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";
+ }
+}
+
--- /dev/null
+/**************************************************************************
+**
+** 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
-<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>
<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>
-<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>
<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>
//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)
{
BreakHandler::~BreakHandler()
{
+ if (m_bp && m_masterList) {
+ qDeleteAll(*m_bp);
+ m_bp->clear();
+ delete m_bp;
+ }
clear();
}
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();
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;
}
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);
}
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);
}
void BreakHandler::removeBreakpoint(BreakpointData *data)
{
- removeBreakpointHelper(m_bp.indexOf(data));
+ QTC_ASSERT(m_bp,/**/);
+ removeBreakpointHelper(m_bp->indexOf(data));
emit layoutChanged();
}
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;
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;
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);
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();
}
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();
}
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;
bool watchPointAt(quint64 address) const;
void updateMarkers();
bool isActive() const;
+ bool isMasterList() const;
Breakpoints insertedBreakpoints() const;
void takeInsertedBreakPoint(BreakpointData *);
void removeBreakpointHelper(int index);
void append(BreakpointData *data);
+ void initMasterList();
+
const QIcon m_breakpointIcon;
const QIcon m_disabledBreakpointIcon;
const QIcon m_pendingBreakPointIcon;
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;
#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>
{
}
+bool DebuggerEngine::acceptsBreakpoint(const BreakpointData *)
+{
+ return true;
+}
+
void DebuggerEngine::selectThread(int)
{
}
class SourceFilesHandler;
class ThreadsHandler;
class WatchHandler;
+class BreakpointData;
struct WatchUpdateFlags
{
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);
handler->updateMarkers();
}
+bool GdbEngine::acceptsBreakpoint(const Internal::BreakpointData *br)
+{
+ return !( br->fileName.endsWith(QLatin1String("js")) || br->fileName.endsWith(QLatin1String("qml")) );
+}
+
//////////////////////////////////////////////////////////////////////
//
// 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();
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;
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);
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);
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);
}
}
+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)
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);
-<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>
<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>
-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)
#ifdef CPP_ENABLED
# include "formclasswizard.h"
-# include <cppeditor/cppeditorconstants.h>
# include "cppsettingspage.h"
#endif
-<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>
<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>
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
#include <coreplugin/statusbarmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/session.h>
#include <texteditor/basetextdocumentlayout.h>
#include <texteditor/basetexteditor.h>
using namespace FakeVim::Internal;
using namespace TextEditor;
using namespace Core;
-using namespace ProjectExplorer;
-
namespace FakeVim {
namespace Constants {
-<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>
<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>
{
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;
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();
-<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>
<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>
include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../plugins/cpptools/cpptools.pri)
-include(../../plugins/cppeditor/cppeditor.pri)
include(../../plugins/texteditor/texteditor.pri)
-<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>
<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>
-<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>
<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>
-<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>
<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>
-<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>
<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>
-<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>
<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>
-<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>
<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>
-<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>
<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>
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
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
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
-<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>
<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>
-<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>
<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>
-<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>
<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>
-<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>
<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>
-<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>
<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>
-<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>
<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>
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)
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();
}
-
#define QTUICODEMODELSUPPORT_H
#include <cpptools/cppmodelmanagerinterface.h>
+#include <cpptools/uicodecompletionsupport.h>
#include <QtCore/QDateTime>
class Qt4Project;
namespace Internal {
-class Qt4UiCodeModelSupport : public CppTools::AbstractEditorSupport
+class Qt4UiCodeModelSupport : public CppTools::UiCodeModelSupport
{
public:
Qt4UiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
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;
};
int MobileApp::stubVersionMinor() const { return StubVersion; }
-const int MobileApp::StubVersion = 1;
+const int MobileApp::StubVersion = 2;
} // namespace Internal
} // namespace Qt4ProjectManager
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 a shared library
str << "\n"
"symbian {\n"
- " #Symbian specific definitions\n"
" MMP_RULES += EXPORTUNFROZEN\n"
" TARGET.UID3 = " + symbianUid + "\n"
" TARGET.CAPABILITY = " + generateCapabilitySet(symbianCapabilities).toAscii() + "\n"
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"
-<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>
<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>
-<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>
<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>
-<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>
<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>
-<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>
<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>
-<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>
<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>
-<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>
<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>
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;
-<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>
<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>
#include "checkoutjobs.h"
#include <projectexplorer/projectexplorer.h>
-#include <projectexplorer/session.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QFileInfo>
-<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>
<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>
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";
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();
}
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 {
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;
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);
// --------------- 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)
{
}
str << "RunControl: '" << idString() << "' suspended at 0x"
<< m_pc << ": '" << m_reason << "'.";
str.setIntegerBase(10);
+ if (!m_message.isEmpty())
+ str << " (" <<m_message << ')';
}
QString TcfTrkRunControlContextSuspendedEvent::toString() const
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,
private:
const quint64 m_pc;
const QByteArray m_reason;
+ const QByteArray m_message;
};
// RunControlContextSuspended due to module load
+++ /dev/null
-/**************************************************************************
-**
-** 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;
-}
+++ /dev/null
-#-------------------------------------------------
-#
-# 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
+++ /dev/null
-#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;
-}
+++ /dev/null
-#-------------------------------------------------
-#
-# 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
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)
# Defines import symbol as empty
DEFINES+=QTCREATOR_UTILS_STATIC_LIB
+include(../../../src/libs/utils/utils-lib.pri)
+
FAKEVIMDIR = ../../../src/plugins/fakevim
UTILSDIR = ../../../src/libs
$$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
-
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
#include <QtGui/QPainterPath>
#include <QtGui/QRegion>
#include <QtGui/QStandardItemModel>
+#include <QtGui/QTextCursor>
+#include <QtGui/QTextDocument>
#include <QtNetwork/QHostAddress>
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);
testFunction();
testQImage();
testNoArgumentName(1, 2, 3);
+ testQTextCursor();
testInput();
testOutput();
testHidden();
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;
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;
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;