diff --git a/dist/changes-2.5.0 b/dist/changes-2.5.0
index 4296f6ffc0e..44173097b37 100644
--- a/dist/changes-2.5.0
+++ b/dist/changes-2.5.0
@@ -31,7 +31,7 @@ Editing
* Fix position of code-assist popup when cursor is outside viewport
(QTCREATORBUG-6843)
* Add experimental plugin for showing "TODO"s in files
- [by Dmitry Savchenko]
+ [by Dmitry Savchenko, initial version by Vasiliy Sorokin]
* Add "Open with" context menu in resource editor (QTCREATORBUG-4224)
* Add task indicators in the left margin of a line
diff --git a/doc/images/qtcreator-add-library-wizard-ex-1.png b/doc/images/qtcreator-add-library-wizard-ex-1.png
index e9aa6ed3c67..f339c1ff956 100644
Binary files a/doc/images/qtcreator-add-library-wizard-ex-1.png and b/doc/images/qtcreator-add-library-wizard-ex-1.png differ
diff --git a/doc/images/qtcreator-add-library-wizard.png b/doc/images/qtcreator-add-library-wizard.png
index 28db0f8ccca..e09a19b4b22 100644
Binary files a/doc/images/qtcreator-add-library-wizard.png and b/doc/images/qtcreator-add-library-wizard.png differ
diff --git a/doc/images/qtcreator-add-resource-wizard.png b/doc/images/qtcreator-add-resource-wizard.png
index eb486000283..cd5a5983fbc 100644
Binary files a/doc/images/qtcreator-add-resource-wizard.png and b/doc/images/qtcreator-add-resource-wizard.png differ
diff --git a/doc/images/qtcreator-add-resource-wizard2.png b/doc/images/qtcreator-add-resource-wizard2.png
index 267fe470ed5..a6c09a49fb6 100644
Binary files a/doc/images/qtcreator-add-resource-wizard2.png and b/doc/images/qtcreator-add-resource-wizard2.png differ
diff --git a/doc/images/qtcreator-add-resource-wizard3.png b/doc/images/qtcreator-add-resource-wizard3.png
index 4c274f7a717..8de6129624d 100644
Binary files a/doc/images/qtcreator-add-resource-wizard3.png and b/doc/images/qtcreator-add-resource-wizard3.png differ
diff --git a/doc/images/qtcreator-add-resource.png b/doc/images/qtcreator-add-resource.png
index 43aabd41d20..9d11d0eef16 100644
Binary files a/doc/images/qtcreator-add-resource.png and b/doc/images/qtcreator-add-resource.png differ
diff --git a/doc/images/qtcreator-class-info-qt-gui.png b/doc/images/qtcreator-class-info-qt-gui.png
index ebee4e42699..169c6bc5c8a 100644
Binary files a/doc/images/qtcreator-class-info-qt-gui.png and b/doc/images/qtcreator-class-info-qt-gui.png differ
diff --git a/doc/images/qtcreator-intro-and-location-qt-gui.png b/doc/images/qtcreator-intro-and-location-qt-gui.png
index 74c0e31bd8f..489ba889423 100644
Binary files a/doc/images/qtcreator-intro-and-location-qt-gui.png and b/doc/images/qtcreator-intro-and-location-qt-gui.png differ
diff --git a/doc/images/qtcreator-new-project-qt-versions-qt-gui.png b/doc/images/qtcreator-new-project-qt-versions-qt-gui.png
index 5f0745fd909..d4debb8bd6f 100644
Binary files a/doc/images/qtcreator-new-project-qt-versions-qt-gui.png and b/doc/images/qtcreator-new-project-qt-versions-qt-gui.png differ
diff --git a/doc/images/qtcreator-new-project-summary-qt-gui.png b/doc/images/qtcreator-new-project-summary-qt-gui.png
index 8a01db5340a..4a84523a8f6 100644
Binary files a/doc/images/qtcreator-new-project-summary-qt-gui.png and b/doc/images/qtcreator-new-project-summary-qt-gui.png differ
diff --git a/doc/images/qtcreator-new-qt-gui-application.png b/doc/images/qtcreator-new-qt-gui-application.png
index 330fc3e1101..690ab5ddaff 100644
Binary files a/doc/images/qtcreator-new-qt-gui-application.png and b/doc/images/qtcreator-new-qt-gui-application.png differ
diff --git a/doc/images/qtcreator-project-targets.png b/doc/images/qtcreator-project-targets.png
new file mode 100644
index 00000000000..c95e52092d5
Binary files /dev/null and b/doc/images/qtcreator-project-targets.png differ
diff --git a/doc/images/qtcreator-qt4-addbutton.png b/doc/images/qtcreator-qt4-addbutton.png
index 4c7836835e6..cd858fb4b2f 100644
Binary files a/doc/images/qtcreator-qt4-addbutton.png and b/doc/images/qtcreator-qt4-addbutton.png differ
diff --git a/doc/images/qtcreator-symbian-components-example-simulated.png b/doc/images/qtcreator-symbian-components-example-simulated.png
index 79971bde81e..14227bbbb0e 100644
Binary files a/doc/images/qtcreator-symbian-components-example-simulated.png and b/doc/images/qtcreator-symbian-components-example-simulated.png differ
diff --git a/doc/images/qtcreator-symbian-components-example-ui.png b/doc/images/qtcreator-symbian-components-example-ui.png
index d9093bdf194..510966a1945 100644
Binary files a/doc/images/qtcreator-symbian-components-example-ui.png and b/doc/images/qtcreator-symbian-components-example-ui.png differ
diff --git a/doc/images/qtcreator-symbian-components-example.png b/doc/images/qtcreator-symbian-components-example.png
index fecf5e9daa9..7096b407bde 100644
Binary files a/doc/images/qtcreator-symbian-components-example.png and b/doc/images/qtcreator-symbian-components-example.png differ
diff --git a/doc/images/qtcreator-target-remove.png b/doc/images/qtcreator-target-remove.png
index 4cab5536306..e4f2dfdf40d 100644
Binary files a/doc/images/qtcreator-target-remove.png and b/doc/images/qtcreator-target-remove.png differ
diff --git a/doc/images/qtcreator-texfinder-filter.png b/doc/images/qtcreator-texfinder-filter.png
index b40ea9b37ee..f4a5e26ea3c 100644
Binary files a/doc/images/qtcreator-texfinder-filter.png and b/doc/images/qtcreator-texfinder-filter.png differ
diff --git a/doc/images/qtcreator-texfinder-ui-horizontal-layout.png b/doc/images/qtcreator-texfinder-ui-horizontal-layout.png
index 482918fa480..3b82d7a44aa 100644
Binary files a/doc/images/qtcreator-texfinder-ui-horizontal-layout.png and b/doc/images/qtcreator-texfinder-ui-horizontal-layout.png differ
diff --git a/doc/images/qtcreator-textfinder-contents.png b/doc/images/qtcreator-textfinder-contents.png
index 84e8d17bc6b..30aea0ec08e 100644
Binary files a/doc/images/qtcreator-textfinder-contents.png and b/doc/images/qtcreator-textfinder-contents.png differ
diff --git a/doc/images/qtcreator-textfinder-objectname.png b/doc/images/qtcreator-textfinder-objectname.png
index d58cf2df485..35244cfcaa7 100644
Binary files a/doc/images/qtcreator-textfinder-objectname.png and b/doc/images/qtcreator-textfinder-objectname.png differ
diff --git a/doc/images/qtcreator-textfinder-screenshot.png b/doc/images/qtcreator-textfinder-screenshot.png
index 103e96cc6c7..9816219e851 100644
Binary files a/doc/images/qtcreator-textfinder-screenshot.png and b/doc/images/qtcreator-textfinder-screenshot.png differ
diff --git a/doc/images/qtcreator-textfinder-ui-widgets.png b/doc/images/qtcreator-textfinder-ui-widgets.png
index 8b2b334d59e..2bd0951e239 100644
Binary files a/doc/images/qtcreator-textfinder-ui-widgets.png and b/doc/images/qtcreator-textfinder-ui-widgets.png differ
diff --git a/doc/images/qtcreator-textfinder-ui.png b/doc/images/qtcreator-textfinder-ui.png
index a5717a1f51a..8405689b1ee 100644
Binary files a/doc/images/qtcreator-textfinder-ui.png and b/doc/images/qtcreator-textfinder-ui.png differ
diff --git a/doc/images/qtcreator-vcs-diff.png b/doc/images/qtcreator-vcs-diff.png
index 8366b695ea8..360e2709974 100644
Binary files a/doc/images/qtcreator-vcs-diff.png and b/doc/images/qtcreator-vcs-diff.png differ
diff --git a/doc/images/qtcreator-vcs-gitbranch.png b/doc/images/qtcreator-vcs-gitbranch.png
index 78c52aff83a..decbcadc76a 100644
Binary files a/doc/images/qtcreator-vcs-gitbranch.png and b/doc/images/qtcreator-vcs-gitbranch.png differ
diff --git a/doc/images/qtcreator-vcs-log.png b/doc/images/qtcreator-vcs-log.png
index 0b9aeb09267..aa88ff31ed4 100644
Binary files a/doc/images/qtcreator-vcs-log.png and b/doc/images/qtcreator-vcs-log.png differ
diff --git a/doc/images/qtcreator-vcs-pane.png b/doc/images/qtcreator-vcs-pane.png
index 51792403844..3c7e21a040a 100644
Binary files a/doc/images/qtcreator-vcs-pane.png and b/doc/images/qtcreator-vcs-pane.png differ
diff --git a/doc/src/overview/creator-tutorials.qdoc b/doc/src/overview/creator-tutorials.qdoc
index c5ad54d61d5..ddd1d4ac6c1 100644
--- a/doc/src/overview/creator-tutorials.qdoc
+++ b/doc/src/overview/creator-tutorials.qdoc
@@ -44,7 +44,7 @@
\o \l{Creating a Qt Quick Application}
Learn about the basic Qt Quick concepts and QML elements.
- \o \l{Creating a Qt Quick Application Using Qt Quick Components}
+ \o \l{Using Qt Quick Components}
Learn how to develop a Qt Quick application for mobile devices.
diff --git a/doc/src/projects/creator-projects-libraries.qdoc b/doc/src/projects/creator-projects-libraries.qdoc
index 08389980987..816cef63ba3 100644
--- a/doc/src/projects/creator-projects-libraries.qdoc
+++ b/doc/src/projects/creator-projects-libraries.qdoc
@@ -82,9 +82,8 @@
\list 1
- \o In the \gui Projects pane, open the project file (.pro).
-
- \o Right-click in the code editor to open the context menu and select
+ \o In the \gui Projects pane, right-click the project name to open the
+ context menu and select
\gui {Add Library}.
\o Follow the instructions of the wizard.
@@ -102,7 +101,7 @@
\list 1
- \o Choose \gui {File > New File or Project > Other Projects >
+ \o Choose \gui {File > New File or Project > Libraries >
C++ Library} to create the library.
The \gui {Introduction and Product Location} dialog opens.
@@ -118,10 +117,8 @@
\gui {Project Management} dialog. In the \gui {Add to project}
list, select a project. For example, \bold myapp.
- \o In the \gui Projects pane, open the project file (.pro).
- For example, \bold myapp.pro.
-
- \o Right-click in the code editor to open the context menu and select
+ \o In the \gui Projects pane, right-click the project name to open the
+ context menu and select
\gui {Add Library > Internal Library > Next}.
\o In the \gui Library field, select \bold mylib and click \gui Next.
diff --git a/doc/src/projects/creator-projects-settings-overview.qdoc b/doc/src/projects/creator-projects-settings-overview.qdoc
index 08a6036a13f..215a67097b1 100644
--- a/doc/src/projects/creator-projects-settings-overview.qdoc
+++ b/doc/src/projects/creator-projects-settings-overview.qdoc
@@ -39,7 +39,7 @@
To view and modify the settings for currently open projects, switch to the
\gui Projects mode by pressing \key Ctrl+5.
- \image qtcreator-projectpane.png
+ \image qtcreator-project-targets.png
You can add a target if the development environment for the target platform
is installed on the development PC and the Qt version is configured. Click
@@ -60,18 +60,18 @@
\list
- \o If you have installed the development environment for only
- one target, the \gui Targets tab is replaced by a \gui Build
- tab and a \gui Run tab.
+ \o \l{Specifying Build Settings}{Build Settings}
+
+ \o \l{Specifying Run Settings}{Run Settings}
- \o If you have not configured the project for building, the
- \gui Targets tab is replaced by the \l{Opening Projects}
- {Configure Projects} tab.
\endlist
- \o \l{Specifying Build Settings}{Build Settings}
-
- \o \l{Specifying Run Settings}{Run Settings}
+ \note If you have installed the development environment for only
+ one target, the \gui Targets tab is replaced by a \gui Build
+ tab and a \gui Run tab.
+ If you have not configured the project for building, the
+ \gui Targets tab is replaced by the \l{Opening Projects}
+ {Configure Projects} tab.
\o \l{Specifying Editor Settings}{Editor Settings}
diff --git a/doc/src/qtcreator.qdoc b/doc/src/qtcreator.qdoc
index ccce4c30998..e52e0732126 100644
--- a/doc/src/qtcreator.qdoc
+++ b/doc/src/qtcreator.qdoc
@@ -136,7 +136,7 @@
\o \l{Tutorials}
\list
\o \l{Creating a Qt Quick Application}
- \o \l{Creating a Qt Quick Application Using Qt Quick Components}
+ \o \l{Using Qt Quick Components}
\o \l{Creating a Qt Widget Based Application}
\endlist
\endlist
diff --git a/doc/src/symbian/qtquick-components-symbian.qdoc b/doc/src/symbian/qtquick-components-symbian.qdoc
index 102dba4e43d..15962550a6c 100644
--- a/doc/src/symbian/qtquick-components-symbian.qdoc
+++ b/doc/src/symbian/qtquick-components-symbian.qdoc
@@ -31,7 +31,7 @@
\page creator-qml-components-example.html
\nextpage creator-writing-program.html
- \title Creating a Qt Quick Application Using Qt Quick Components
+ \title Using Qt Quick Components
\note To complete this tutorial, you must install the Qt Quick Components
for Symbian and the Symbian Anna target as part of the \QSDK. In addition,
@@ -50,17 +50,14 @@
\list 1
- \o Select \gui{File > New File or Project > Qt Quick Project > Qt Quick
- Application > Choose}.
+ \o Select \gui{File > New File or Project > Applications > Qt Quick
+ Application for Symbian > Choose}.
\o In the \gui{Name} field, type \bold {BatteryStatus}.
\o In the \gui {Create in} field, enter the path for the project files.
For example, \c {C:\Qt\examples}, and then click \gui{Next}.
- \o In the \gui {Application Type} dialog, select \gui {Qt Quick
- Components for Symbian}, and then click \gui{Next}.
-
\o Select \gui {Symbian Device} and \gui {\QS} targets, and
then click \gui{Next}.
diff --git a/doc/src/widgets/qtdesigner-app-tutorial.qdoc b/doc/src/widgets/qtdesigner-app-tutorial.qdoc
index ae051bf88e4..ad2b7d0b6fd 100644
--- a/doc/src/widgets/qtdesigner-app-tutorial.qdoc
+++ b/doc/src/widgets/qtdesigner-app-tutorial.qdoc
@@ -45,7 +45,7 @@
\list 1
- \o Select \gui{File > New File or Project > Qt Widget Project > Qt Gui
+ \o Select \gui{File > New File or Project > Applications > Qt Gui
Application > Choose}.
\image qtcreator-new-qt-gui-application.png "New File or Project dialog"
diff --git a/scripts/deployqt.py b/scripts/deployqt.py
index cf1b008e05f..e4c1078f5d4 100755
--- a/scripts/deployqt.py
+++ b/scripts/deployqt.py
@@ -245,6 +245,7 @@ def main():
sys.exit(2)
QT_INSTALL_LIBS = readQmakeVar(qmake_bin, 'QT_INSTALL_LIBS')
+ QT_INSTALL_BINS = readQmakeVar(qmake_bin, 'QT_INSTALL_BINS')
QT_INSTALL_PLUGINS = readQmakeVar(qmake_bin, 'QT_INSTALL_PLUGINS')
QT_INSTALL_IMPORTS = readQmakeVar(qmake_bin, 'QT_INSTALL_IMPORTS')
QT_INSTALL_TRANSLATIONS = readQmakeVar(qmake_bin, 'QT_INSTALL_TRANSLATIONS')
@@ -257,7 +258,10 @@ def main():
global debug_build
debug_build = is_debug_build(install_dir)
- copy_qt_libs(install_dir, QT_INSTALL_LIBS, QT_INSTALL_PLUGINS, QT_INSTALL_IMPORTS, plugins, imports)
+ if sys.platform.startswith('win'):
+ copy_qt_libs(install_dir, QT_INSTALL_BINS, QT_INSTALL_PLUGINS, QT_INSTALL_IMPORTS, plugins, imports)
+ else:
+ copy_qt_libs(install_dir, QT_INSTALL_LIBS, QT_INSTALL_PLUGINS, QT_INSTALL_IMPORTS, plugins, imports)
copy_translations(install_dir, QT_INSTALL_TRANSLATIONS, tr_catalogs)
if not sys.platform.startswith('win'):
diff --git a/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp b/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp
index 574ff58b8aa..4433669b6a6 100644
--- a/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp
+++ b/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp
@@ -99,7 +99,7 @@ QString Html5ApplicationViewerPrivate::adjustPath(const QString &path)
}
#endif
#endif
- return path;
+ return QFileInfo(path).absoluteFilePath();
}
void Html5ApplicationViewerPrivate::quit()
@@ -130,7 +130,7 @@ Html5ApplicationViewer::~Html5ApplicationViewer()
void Html5ApplicationViewer::loadFile(const QString &fileName)
{
- m_d->m_webView->setUrl(QUrl(Html5ApplicationViewerPrivate::adjustPath(fileName)));
+ m_d->m_webView->setUrl(QUrl::fromLocalFile(Html5ApplicationViewerPrivate::adjustPath(fileName)));
}
void Html5ApplicationViewer::loadUrl(const QUrl &url)
diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts
index e5bc37137e1..c57b541a08b 100644
--- a/share/qtcreator/translations/qtcreator_de.ts
+++ b/share/qtcreator/translations/qtcreator_de.ts
@@ -21220,7 +21220,7 @@ Fehler: %2
Import build from %1.
- Build aus %1. importieren.
+ Build aus %1 importieren.
Already imported build
diff --git a/share/qtcreator/welcomescreen/widgets/SessionItem.qml b/share/qtcreator/welcomescreen/widgets/SessionItem.qml
index ef5651e88ef..fb660c7ec3b 100644
--- a/share/qtcreator/welcomescreen/widgets/SessionItem.qml
+++ b/share/qtcreator/welcomescreen/widgets/SessionItem.qml
@@ -115,6 +115,7 @@ Item {
}
Column {
+ y: -4
x: parent.margin + 8
//y: parent.margin
id: innerColumn
@@ -149,7 +150,7 @@ Item {
wrapMode: Text.WrapAnywhere
maximumLineCount: 2
elide: Text.ElideRight
- height: font.pixelSize * 2 + 4
+ height: lineCount == 2 ? font.pixelSize * 2 + 4 : font.pixelSize + 2
color: "#6b6b6b"
width: delegate.ListView.view.width - 48
MouseArea {
@@ -220,7 +221,6 @@ Item {
}
Item {
-
x: delegate.ListView.view.width - 65
width: 38
height: 20
diff --git a/share/qtcreator/welcomescreen/widgets/Sessions.qml b/share/qtcreator/welcomescreen/widgets/Sessions.qml
index ac8970c7666..134ff1fff82 100644
--- a/share/qtcreator/welcomescreen/widgets/Sessions.qml
+++ b/share/qtcreator/welcomescreen/widgets/Sessions.qml
@@ -76,8 +76,7 @@ Item {
anchors.fill: parent
verticalMinimumValue: vscrollbar.minimumValue
verticalMaximumValue: vscrollbar.maximumValue
-
- onVerticalValueChanged: root.contentY = Math.round(verticalValue / root.delegateHeight) * root.delegateHeight
+ onVerticalValueChanged: root.contentY = verticalValue
}
ScrollBar {
@@ -92,7 +91,7 @@ Item {
anchors.bottom: parent.bottom
singleStep: root.delegateHeight
anchors.topMargin: styleitem.style === "mac" ? 1 : 0
- onValueChanged: root.contentY = Math.round(value / root.delegateHeight) * root.delegateHeight
+ onValueChanged: root.contentY = value
anchors.rightMargin: styleitem.frameoffset
anchors.bottomMargin: styleitem.frameoffset
value: root.contentY
diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.h b/src/libs/qmljs/qmljsmodelmanagerinterface.h
index b3d7069fafc..cd73008835c 100644
--- a/src/libs/qmljs/qmljsmodelmanagerinterface.h
+++ b/src/libs/qmljs/qmljsmodelmanagerinterface.h
@@ -64,6 +64,7 @@ public:
ProjectInfo(QPointer project)
: project(project)
+ , tryQmlDump(false)
{ }
operator bool() const
diff --git a/src/plugins/coreplugin/dialogs/newdialog.cpp b/src/plugins/coreplugin/dialogs/newdialog.cpp
index 9180a752ab7..28d81bfa77a 100644
--- a/src/plugins/coreplugin/dialogs/newdialog.cpp
+++ b/src/plugins/coreplugin/dialogs/newdialog.cpp
@@ -333,7 +333,9 @@ Core::IWizard *NewDialog::showDialog()
const int retVal = exec();
idx = m_ui->templateCategoryView->currentIndex();
- lastCategory = m_model->itemFromIndex(m_twoLevelProxyModel->mapToSource(idx))->data(Qt::UserRole).toString();
+ QStandardItem *currentItem = m_model->itemFromIndex(m_twoLevelProxyModel->mapToSource(idx));
+ if (currentItem)
+ lastCategory = currentItem->data(Qt::UserRole).toString();
if (retVal != Accepted)
return 0;
diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp
index 44fce2a77f4..9bea3f0d4c5 100644
--- a/src/plugins/cppeditor/cppeditor.cpp
+++ b/src/plugins/cppeditor/cppeditor.cpp
@@ -2381,7 +2381,10 @@ bool CPPEditorWidget::handleDocumentationComment(QKeyEvent *e)
if (followinPos == text.length()
|| text.at(followinPos) != QLatin1Char('*')) {
QString newLine(QLatin1Char('\n'));
- newLine.append(QString(offset, QLatin1Char(' ')));
+ QTextCursor c(cursor);
+ c.movePosition(QTextCursor::StartOfBlock);
+ c.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, offset);
+ newLine.append(c.selectedText());
if (text.at(offset) == QLatin1Char('/')) {
newLine.append(QLatin1String(" *"));
} else {
diff --git a/src/plugins/cpptools/doxygengenerator.cpp b/src/plugins/cpptools/doxygengenerator.cpp
index fe48422344e..5737192bf10 100644
--- a/src/plugins/cpptools/doxygengenerator.cpp
+++ b/src/plugins/cpptools/doxygengenerator.cpp
@@ -56,7 +56,6 @@ DoxygenGenerator::DoxygenGenerator()
, m_generateBrief(true)
, m_startComment(true)
, m_style(QtStyle)
- , m_commentOffset(0)
{}
void DoxygenGenerator::setStyle(DocumentationStyle style)
@@ -308,16 +307,11 @@ void DoxygenGenerator::assignCommentOffset(QTextCursor cursor)
cursor.setPosition(cursor.anchor());
}
- m_commentOffset = cursor.positionInBlock();
+ cursor.movePosition(QTextCursor::StartOfBlock, QTextCursor::KeepAnchor);
+ m_commentOffset = cursor.selectedText();
}
QString DoxygenGenerator::offsetString() const
{
- // Note: Currently we don't indent comments, but simply preserve them in the original
- // relative positions. What we do here is just to make sure that such positions are correct,
- // although they might still be wrong from an indentation point of view (for instance,
- // using spaces instead of tabs). Therefore, the content generated should still have
- // the indentation strings fixed.
-
- return QString(m_commentOffset, QLatin1Char(' '));
+ return m_commentOffset;
}
diff --git a/src/plugins/cpptools/doxygengenerator.h b/src/plugins/cpptools/doxygengenerator.h
index a9d1cfbfa4d..77b6db8504e 100644
--- a/src/plugins/cpptools/doxygengenerator.h
+++ b/src/plugins/cpptools/doxygengenerator.h
@@ -95,7 +95,7 @@ private:
bool m_startComment;
DocumentationStyle m_style;
CPlusPlus::Overview m_printer;
- int m_commentOffset;
+ QString m_commentOffset;
};
} // CppTools
diff --git a/src/plugins/debugger/qml/qmldebuggerclient.h b/src/plugins/debugger/qml/qmldebuggerclient.h
index fcb7c607d88..f6ba4b9c2b0 100644
--- a/src/plugins/debugger/qml/qmldebuggerclient.h
+++ b/src/plugins/debugger/qml/qmldebuggerclient.h
@@ -75,8 +75,9 @@ public:
virtual void changeBreakpoint(const BreakpointModelId &id) = 0;
virtual void synchronizeBreakpoints() = 0;
- virtual void assignValueInDebugger(const QByteArray expr, const quint64 &id,
- const QString &property, const QString &value) = 0;
+ virtual void assignValueInDebugger(const WatchData *data,
+ const QString &expression,
+ const QVariant &valueV) = 0;
virtual void updateWatchData(const WatchData &data) = 0;
virtual void executeDebuggerCommand(const QString &command) = 0;
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index 5580926d416..3e31aeddc4d 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -119,11 +119,13 @@ private:
InteractiveInterpreter m_interpreter;
bool m_validContext;
QHash pendingBreakpoints;
+ bool m_retryOnConnectFail;
};
QmlEnginePrivate::QmlEnginePrivate(QmlEngine *q)
: m_adapter(q),
- m_validContext(false)
+ m_validContext(false),
+ m_retryOnConnectFail(false)
{}
class ASTWalker: public Visitor
@@ -344,15 +346,15 @@ QmlEngine::QmlEngine(const DebuggerStartParameters &startParameters,
connect(&d->m_outputParser, SIGNAL(waitingForConnectionViaOst()),
this, SLOT(beginConnection()));
connect(&d->m_outputParser, SIGNAL(noOutputMessage()),
- this, SLOT(beginConnection()));
+ this, SLOT(tryToConnect()));
connect(&d->m_outputParser, SIGNAL(errorMessage(QString)),
- this, SLOT(connectionStartupFailed(QString)));
+ this, SLOT(appStartupFailed(QString)));
// Only wait 8 seconds for the 'Waiting for connection' on application ouput, then just try to connect
// (application output might be redirected / blocked)
d->m_noDebugOutputTimer.setSingleShot(true);
d->m_noDebugOutputTimer.setInterval(8000);
- connect(&d->m_noDebugOutputTimer, SIGNAL(timeout()), this, SLOT(beginConnection()));
+ connect(&d->m_noDebugOutputTimer, SIGNAL(timeout()), this, SLOT(tryToConnect()));
qtMessageLogHandler()->setHasEditableRow(true);
@@ -360,6 +362,9 @@ QmlEngine::QmlEngine(const DebuggerStartParameters &startParameters,
SIGNAL(documentUpdated(QmlJS::Document::Ptr)),
this,
SLOT(documentUpdated(QmlJS::Document::Ptr)));
+
+ // we won't get any debug output
+ d->m_retryOnConnectFail = startParameters.useTerminal;
}
QmlEngine::~QmlEngine()
@@ -409,6 +414,12 @@ void QmlEngine::connectionEstablished()
notifyEngineRunAndInferiorRunOk();
}
+void QmlEngine::tryToConnect(quint16 port)
+{
+ d->m_retryOnConnectFail = true;
+ beginConnection(port);
+}
+
void QmlEngine::beginConnection(quint16 port)
{
d->m_noDebugOutputTimer.stop();
@@ -434,7 +445,7 @@ void QmlEngine::beginConnection(quint16 port)
}
}
-void QmlEngine::connectionStartupFailed(const QString &errorMessage)
+void QmlEngine::connectionStartupFailed()
{
if (isSlaveEngine()) {
if (masterEngine()->state() != InferiorRunOk) {
@@ -443,23 +454,19 @@ void QmlEngine::connectionStartupFailed(const QString &errorMessage)
return;
}
}
+ if (d->m_retryOnConnectFail) {
+ beginConnection();
+ return;
+ }
QMessageBox *infoBox = new QMessageBox(Core::ICore::mainWindow());
infoBox->setIcon(QMessageBox::Critical);
infoBox->setWindowTitle(tr("Qt Creator"));
- if (qobject_cast(sender())) {
- infoBox->setText(tr("Could not connect to the in-process QML debugger."
- "\nDo you want to retry?"));
- infoBox->setStandardButtons(QMessageBox::Retry | QMessageBox::Cancel |
- QMessageBox::Help);
- infoBox->setDefaultButton(QMessageBox::Retry);
- }
- if (qobject_cast(sender())) {
- infoBox->setText(tr("Could not connect to the in-process QML debugger."
- "\n%1").arg(errorMessage));
- infoBox->setStandardButtons(QMessageBox::Ok | QMessageBox::Help);
- infoBox->setDefaultButton(QMessageBox::Ok);
- }
+ infoBox->setText(tr("Could not connect to the in-process QML debugger."
+ "\nDo you want to retry?"));
+ infoBox->setStandardButtons(QMessageBox::Retry | QMessageBox::Cancel |
+ QMessageBox::Help);
+ infoBox->setDefaultButton(QMessageBox::Retry);
infoBox->setModal(true);
connect(infoBox, SIGNAL(finished(int)),
@@ -468,6 +475,22 @@ void QmlEngine::connectionStartupFailed(const QString &errorMessage)
infoBox->show();
}
+void QmlEngine::appStartupFailed(const QString &errorMessage)
+{
+ QMessageBox *infoBox = new QMessageBox(Core::ICore::mainWindow());
+ infoBox->setIcon(QMessageBox::Critical);
+ infoBox->setWindowTitle(tr("Qt Creator"));
+ infoBox->setText(tr("Could not connect to the in-process QML debugger."
+ "\n%1").arg(errorMessage));
+ infoBox->setStandardButtons(QMessageBox::Ok | QMessageBox::Help);
+ infoBox->setDefaultButton(QMessageBox::Ok);
+ connect(infoBox, SIGNAL(finished(int)),
+ this, SLOT(errorMessageBoxFinished(int)));
+ infoBox->show();
+
+ notifyEngineRunFailed();
+}
+
void QmlEngine::errorMessageBoxFinished(int result)
{
switch (result) {
@@ -484,7 +507,7 @@ void QmlEngine::errorMessageBoxFinished(int result)
if (state() == InferiorRunOk) {
notifyInferiorSpontaneousStop();
notifyInferiorIll();
- } else {
+ } else if (state() == EngineRunRequested) {
notifyEngineRunFailed();
}
break;
@@ -576,6 +599,8 @@ void QmlEngine::runEngine()
beginConnection();
else
startApplicationLauncher();
+ } else {
+ d->m_noDebugOutputTimer.start();
}
}
@@ -973,9 +998,10 @@ bool QmlEngine::setToolTipExpression(const QPoint &mousePos,
void QmlEngine::assignValueInDebugger(const WatchData *data,
const QString &expression, const QVariant &valueV)
{
- quint64 objectId = data->id;
- if (objectId > 0 && !expression.isEmpty() && d->m_adapter.activeDebuggerClient()) {
- d->m_adapter.activeDebuggerClient()->assignValueInDebugger(expression.toUtf8(), objectId, expression, valueV.toString());
+ if (!expression.isEmpty() && d->m_adapter.activeDebuggerClient()) {
+ d->m_adapter.activeDebuggerClient()->assignValueInDebugger(data,
+ expression,
+ valueV);
}
}
diff --git a/src/plugins/debugger/qml/qmlengine.h b/src/plugins/debugger/qml/qmlengine.h
index 25e11669563..48ebf238da5 100644
--- a/src/plugins/debugger/qml/qmlengine.h
+++ b/src/plugins/debugger/qml/qmlengine.h
@@ -161,9 +161,11 @@ signals:
TextEditor::ITextEditor *editor, int cursorPos);
private slots:
+ void tryToConnect(quint16 port = 0);
void beginConnection(quint16 port = 0);
void connectionEstablished();
- void connectionStartupFailed(const QString &errorMessage = QString());
+ void connectionStartupFailed();
+ void appStartupFailed(const QString &errorMessage);
void connectionError(QAbstractSocket::SocketError error);
void serviceConnectionError(const QString &service);
void appendMessage(const QString &msg, Utils::OutputFormat);
diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
index ee888af93e6..9067ec08c33 100644
--- a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
+++ b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
@@ -1153,11 +1153,12 @@ void QmlV8DebuggerClient::synchronizeBreakpoints()
//NOT USED
}
-void QmlV8DebuggerClient::assignValueInDebugger(const QByteArray /*expr*/, const quint64 &/*id*/,
- const QString &property, const QString &value)
+void QmlV8DebuggerClient::assignValueInDebugger(const WatchData * /*data*/,
+ const QString &expr,
+ const QVariant &valueV)
{
StackHandler *stackHandler = d->engine->stackHandler();
- QString expression = QString(_("%1 = %2;")).arg(property).arg(value);
+ QString expression = QString(_("%1 = %2;")).arg(expr).arg(valueV.toString());
if (stackHandler->isContentsValid() && stackHandler->currentFrame().isUsable()) {
d->evaluate(expression, false, false, stackHandler->currentIndex());
} else {
@@ -1309,13 +1310,22 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data)
BreakpointModelId id = d->breakpointsSync.take(seq);
d->breakpoints.insert(id, index);
- BreakHandler *handler = d->engine->breakHandler();
- if (handler->state(id) != BreakpointInserted) {
- BreakpointResponse br = handler->response(id);
- br.lineNumber = breakpointData.value(_("line")
- ).toInt() + 1;
- handler->setResponse(id, br);
- handler->notifyBreakpointInsertOk(id);
+ //Is actual position info present? Then breakpoint was
+ //accepted
+ const QVariantList actualLocations =
+ breakpointData.value(
+ _("actual_locations")).toList();
+ if (actualLocations.count()) {
+ //The breakpoint requested line should be same as
+ //actual line
+ BreakHandler *handler = d->engine->breakHandler();
+ if (handler->state(id) != BreakpointInserted) {
+ BreakpointResponse br = handler->response(id);
+ br.lineNumber = breakpointData.value(_("line")
+ ).toInt() + 1;
+ handler->setResponse(id, br);
+ handler->notifyBreakpointInsertOk(id);
+ }
}
@@ -1480,6 +1490,12 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data)
br.functionName = invocationText;
handler->setResponse(id, br);
}
+ if (handler->state(id) != BreakpointInserted) {
+ br.lineNumber = breakData.value(
+ _("sourceLine")).toInt() + 1;
+ handler->setResponse(id, br);
+ handler->notifyBreakpointInsertOk(id);
+ }
}
}
}
diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.h b/src/plugins/debugger/qml/qmlv8debuggerclient.h
index c7cb0fbe363..7a77b88d853 100644
--- a/src/plugins/debugger/qml/qmlv8debuggerclient.h
+++ b/src/plugins/debugger/qml/qmlv8debuggerclient.h
@@ -87,8 +87,9 @@ public:
void changeBreakpoint(const BreakpointModelId &id);
void synchronizeBreakpoints();
- void assignValueInDebugger(const QByteArray expr, const quint64 &id,
- const QString &property, const QString &value);
+ void assignValueInDebugger(const WatchData *data,
+ const QString &expression,
+ const QVariant &valueV);
void updateWatchData(const WatchData &);
void executeDebuggerCommand(const QString &command);
diff --git a/src/plugins/debugger/qml/qscriptdebuggerclient.cpp b/src/plugins/debugger/qml/qscriptdebuggerclient.cpp
index 7aa0bfa83c0..7fbde8d17f6 100644
--- a/src/plugins/debugger/qml/qscriptdebuggerclient.cpp
+++ b/src/plugins/debugger/qml/qscriptdebuggerclient.cpp
@@ -222,7 +222,9 @@ void QScriptDebuggerClient::startSession()
//Set all breakpoints
BreakHandler *handler = d->engine->breakHandler();
- foreach (BreakpointModelId id, handler->engineBreakpointIds(d->engine)) {
+ DebuggerEngine * engine = d->engine->isSlaveEngine() ?
+ d->engine->masterEngine() : d->engine;
+ foreach (BreakpointModelId id, handler->engineBreakpointIds(engine)) {
QTC_CHECK(handler->state(id) == BreakpointInsertProceeding);
handler->notifyBreakpointInsertOk(id);
}
@@ -313,17 +315,19 @@ void QScriptDebuggerClient::synchronizeBreakpoints()
sendMessage(reply);
}
-void QScriptDebuggerClient::assignValueInDebugger(const QByteArray expr, const quint64 &id,
- const QString &property, const QString &value)
+void QScriptDebuggerClient::assignValueInDebugger(const WatchData *data,
+ const QString &expr,
+ const QVariant &valueV)
{
QByteArray reply;
QDataStream rs(&reply, QIODevice::WriteOnly);
- QByteArray cmd = "SET_PROPERTY";
+ QByteArray cmd = "EXEC";
rs << cmd;
- rs << expr << id << property << value;
- d->logSendMessage(QString::fromLatin1("%1 %2 %3 %4 %5").
- arg(QLatin1String(cmd), QLatin1String(expr),
- QString::number(id), property, value));
+ QString expression = QString(_("%1 = %2;")).arg(expr).arg(valueV.toString());
+ rs << data->iname << expression;
+ d->logSendMessage(QString::fromLatin1("%1 %2 %3 %4").
+ arg(QLatin1String(cmd), QLatin1String(data->iname), expr,
+ valueV.toString()));
sendMessage(reply);
}
@@ -365,6 +369,10 @@ void QScriptDebuggerClient::synchronizeWatchers(const QStringList &watchers)
void QScriptDebuggerClient::expandObject(const QByteArray &iname, quint64 objectId)
{
+ //Check if id is valid
+ if (qint64(objectId) == -1)
+ return;
+
QByteArray reply;
QDataStream rs(&reply, QIODevice::WriteOnly);
QByteArray cmd = "EXPAND";
@@ -431,7 +439,8 @@ void QScriptDebuggerClient::messageReceived(const QByteArray &data)
data.iname = d->engine->watchHandler()->watcherName(data.exp);
d->engine->watchHandler()->insertData(data);
- if (d->engine->watchHandler()->expandedINames().contains(data.iname)) {
+ if (d->engine->watchHandler()->expandedINames().contains(data.iname) &&
+ qint64(data.id) != -1) {
needPing = true;
expandObject(data.iname,data.id);
}
@@ -441,7 +450,8 @@ void QScriptDebuggerClient::messageReceived(const QByteArray &data)
data.iname = "local." + data.exp;
d->engine->watchHandler()->insertData(data);
- if (d->engine->watchHandler()->expandedINames().contains(data.iname)) {
+ if (d->engine->watchHandler()->expandedINames().contains(data.iname) &&
+ qint64(data.id) != -1) {
needPing = true;
expandObject(data.iname,data.id);
}
@@ -511,6 +521,9 @@ void QScriptDebuggerClient::messageReceived(const QByteArray &data)
d->engine->watchHandler()->insertData(data);
} else if (iname == "console") {
d->engine->showMessage(data.value, QtMessageLogOutput);
+ } else if (iname.startsWith("local.")) {
+ data.name = data.name.left(data.name.indexOf(QLatin1Char(' ')));
+ d->engine->watchHandler()->insertData(data);
} else {
qWarning() << "QmlEngine: Unexcpected result: " << iname << data.value;
}
@@ -527,7 +540,8 @@ void QScriptDebuggerClient::messageReceived(const QByteArray &data)
data.iname = iname + '.' + data.exp;
d->engine->watchHandler()->insertData(data);
- if (d->engine->watchHandler()->expandedINames().contains(data.iname)) {
+ if (d->engine->watchHandler()->expandedINames().contains(data.iname) &&
+ qint64(data.id) != -1) {
needPing = true;
expandObject(data.iname, data.id);
}
@@ -552,7 +566,8 @@ void QScriptDebuggerClient::messageReceived(const QByteArray &data)
data.iname = d->engine->watchHandler()->watcherName(data.exp);
d->engine->watchHandler()->insertData(data);
- if (d->engine->watchHandler()->expandedINames().contains(data.iname)) {
+ if (d->engine->watchHandler()->expandedINames().contains(data.iname) &&
+ qint64(data.id) != -1) {
needPing = true;
expandObject(data.iname, data.id);
}
@@ -561,7 +576,8 @@ void QScriptDebuggerClient::messageReceived(const QByteArray &data)
foreach (WatchData data, locals) {
data.iname = "local." + data.exp;
d->engine->watchHandler()->insertData(data);
- if (d->engine->watchHandler()->expandedINames().contains(data.iname)) {
+ if (d->engine->watchHandler()->expandedINames().contains(data.iname) &&
+ qint64(data.id) != -1) {
needPing = true;
expandObject(data.iname, data.id);
}
diff --git a/src/plugins/debugger/qml/qscriptdebuggerclient.h b/src/plugins/debugger/qml/qscriptdebuggerclient.h
index 58602723db2..56dc289829f 100644
--- a/src/plugins/debugger/qml/qscriptdebuggerclient.h
+++ b/src/plugins/debugger/qml/qscriptdebuggerclient.h
@@ -72,8 +72,8 @@ public:
void changeBreakpoint(const BreakpointModelId &id);
void synchronizeBreakpoints();
- void assignValueInDebugger(const QByteArray expr, const quint64 &id,
- const QString &property, const QString &value);
+ void assignValueInDebugger(const WatchData *data, const QString &expression,
+ const QVariant &valueV);
void updateWatchData(const WatchData &data);
void executeDebuggerCommand(const QString &command);
diff --git a/src/plugins/debugger/sourceagent.cpp b/src/plugins/debugger/sourceagent.cpp
index a0c944fbf1c..fea3e3ad983 100644
--- a/src/plugins/debugger/sourceagent.cpp
+++ b/src/plugins/debugger/sourceagent.cpp
@@ -107,7 +107,7 @@ SourceAgentPrivate::~SourceAgentPrivate()
}
SourceAgent::SourceAgent(DebuggerEngine *engine)
- : QObject(0), d(new SourceAgentPrivate)
+ : d(new SourceAgentPrivate)
{
d->engine = engine;
}
diff --git a/src/plugins/debugger/sourceagent.h b/src/plugins/debugger/sourceagent.h
index 020eda2ecec..b98f3250eb7 100644
--- a/src/plugins/debugger/sourceagent.h
+++ b/src/plugins/debugger/sourceagent.h
@@ -33,7 +33,7 @@
#ifndef DEBUGGER_SOURCE_AGENT_H
#define DEBUGGER_SOURCE_AGENT_H
-#include
+#include
namespace Debugger {
@@ -42,7 +42,7 @@ class DebuggerEngine;
namespace Internal {
class SourceAgentPrivate;
-class SourceAgent : public QObject
+class SourceAgent
{
public:
explicit SourceAgent(Debugger::DebuggerEngine *engine);
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index 4eca5a19480..7a3b7361c6e 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -72,8 +72,11 @@ enum { debugModel = 0 };
#define MODEL_DEBUG(s) do { if (debugModel) qDebug() << s; } while (0)
#define MODEL_DEBUGX(s) qDebug() << s
-QHash WatchHandler::m_watcherNames;
-QHash WatchHandler::m_typeFormats;
+static QHash theWatcherNames;
+static QHash theTypeFormats;
+static QHash theIndividualFormats;
+static int theUnprintableBase = -1;
+
static QByteArray stripForFormat(const QByteArray &ba)
{
@@ -97,17 +100,15 @@ static QByteArray stripForFormat(const QByteArray &ba)
return res;
}
-static int m_unprintableBase = -1;
-
void WatchHandler::setUnprintableBase(int base)
{
- m_unprintableBase = base;
+ theUnprintableBase = base;
emitAllChanged();
}
int WatchHandler::unprintableBase()
{
- return m_unprintableBase;
+ return theUnprintableBase;
}
////////////////////////////////////////////////////////////////////
@@ -706,10 +707,10 @@ static QString truncateValue(QString v)
int WatchModel::itemFormat(const WatchData &data) const
{
- const int individualFormat = m_handler->m_individualFormats.value(data.iname, -1);
+ const int individualFormat = theIndividualFormats.value(data.iname, -1);
if (individualFormat != -1)
return individualFormat;
- return m_handler->m_typeFormats.value(stripForFormat(data.type), -1);
+ return theTypeFormats.value(stripForFormat(data.type), -1);
}
static inline QString expression(const WatchItem *item)
@@ -733,8 +734,10 @@ QString WatchModel::display(const WatchItem *item, int col) const
QString result;
switch (col) {
case 0:
- if (item->name.isEmpty())
+ if (m_type == WatchersWatch && item->name.isEmpty())
result = tr("");
+ else if (m_type == ReturnWatch && item->iname.count('.') == 1)
+ result = tr("returned value");
else if (item->name == QLatin1String("*") && item->parent)
result = QLatin1Char('*') + item->parent->name;
else
@@ -837,10 +840,10 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
return QString::fromLatin1(data.type);
case LocalsTypeFormatRole:
- return m_handler->m_typeFormats.value(stripForFormat(data.type), -1);
+ return theTypeFormats.value(stripForFormat(data.type), -1);
case LocalsIndividualFormatRole:
- return m_handler->m_individualFormats.value(data.iname, -1);
+ return theIndividualFormats.value(data.iname, -1);
case LocalsRawValueRole:
return data.value;
@@ -911,9 +914,9 @@ bool WatchModel::setData(const QModelIndex &index, const QVariant &value, int ro
case LocalsIndividualFormatRole: {
const int format = value.toInt();
if (format == -1) {
- m_handler->m_individualFormats.remove(data.iname);
+ theIndividualFormats.remove(data.iname);
} else {
- m_handler->m_individualFormats[data.iname] = format;
+ theIndividualFormats[data.iname] = format;
}
engine()->updateWatchData(data);
break;
@@ -1249,9 +1252,9 @@ QDebug operator<<(QDebug d, const WatchModel &m)
void WatchModel::formatRequests(QByteArray *out, const WatchItem *item) const
{
- int format = m_handler->m_individualFormats.value(item->iname, -1);
+ int format = theIndividualFormats.value(item->iname, -1);
if (format == -1)
- format = m_handler->m_typeFormats.value(stripForFormat(item->type), -1);
+ format = theTypeFormats.value(stripForFormat(item->type), -1);
if (format != -1)
*out += item->iname + ":format=" + QByteArray::number(format) + ',';
foreach (const WatchItem *child, item->children)
@@ -1311,7 +1314,7 @@ void WatchHandler::endCycle()
void WatchHandler::cleanup()
{
m_expandedINames.clear();
- m_watcherNames.remove(QByteArray());
+ theWatcherNames.remove(QByteArray());
m_return->reinitialize();
m_locals->reinitialize();
m_tooltips->reinitialize();
@@ -1429,21 +1432,21 @@ void WatchHandler::removeData(const QByteArray &iname)
QByteArray WatchHandler::watcherName(const QByteArray &exp)
{
- return "watch." + QByteArray::number(m_watcherNames[exp]);
+ return "watch." + QByteArray::number(theWatcherNames[exp]);
}
void WatchHandler::watchExpression(const QString &exp)
{
QTC_ASSERT(m_engine, return);
// Do not insert the same entry more then once.
- if (m_watcherNames.value(exp.toLatin1()))
+ if (theWatcherNames.value(exp.toLatin1()))
return;
// FIXME: 'exp' can contain illegal characters
WatchData data;
data.exp = exp.toLatin1();
data.name = exp;
- m_watcherNames[data.exp] = m_watcherCounter++;
+ theWatcherNames[data.exp] = m_watcherCounter++;
saveWatchers();
if (exp.isEmpty())
@@ -1560,12 +1563,12 @@ void WatchHandler::showEditValue(const WatchData &data)
void WatchHandler::clearWatches()
{
- if (m_watcherNames.isEmpty())
+ if (theWatcherNames.isEmpty())
return;
const QList watches = m_watchers->rootItem()->children;
for (int i = watches.size() - 1; i >= 0; i--)
m_watchers->destroyItem(watches.at(i));
- m_watcherNames.clear();
+ theWatcherNames.clear();
m_watcherCounter = 0;
updateWatchersWindow();
emitAllChanged();
@@ -1576,7 +1579,7 @@ void WatchHandler::removeWatchExpression(const QString &exp0)
{
QByteArray exp = exp0.toLatin1();
MODEL_DEBUG("REMOVE WATCH: " << exp);
- m_watcherNames.remove(exp);
+ theWatcherNames.remove(exp);
foreach (WatchItem *item, m_watchers->rootItem()->children) {
if (item->exp == exp) {
m_watchers->destroyItem(item);
@@ -1598,7 +1601,7 @@ QStringList WatchHandler::watchedExpressions()
{
// Filter out invalid watchers.
QStringList watcherNames;
- QHashIterator it(m_watcherNames);
+ QHashIterator it(theWatcherNames);
while (it.hasNext()) {
it.next();
const QByteArray &watcherName = it.key();
@@ -1621,14 +1624,14 @@ void WatchHandler::loadTypeFormats()
while (it.hasNext()) {
it.next();
if (!it.key().isEmpty())
- m_typeFormats.insert(it.key().toUtf8(), it.value().toInt());
+ theTypeFormats.insert(it.key().toUtf8(), it.value().toInt());
}
}
void WatchHandler::saveTypeFormats()
{
QMap typeFormats;
- QHashIterator it(m_typeFormats);
+ QHashIterator it(theTypeFormats);
while (it.hasNext()) {
it.next();
const int format = it.value();
@@ -1651,7 +1654,7 @@ void WatchHandler::saveSessionData()
void WatchHandler::loadSessionData()
{
loadTypeFormats();
- m_watcherNames.clear();
+ theWatcherNames.clear();
m_watcherCounter = 0;
QVariant value = debuggerCore()->sessionValue(QLatin1String("Watchers"));
foreach (WatchItem *item, m_watchers->rootItem()->children)
@@ -1667,7 +1670,7 @@ void WatchHandler::updateWatchers()
foreach (WatchItem *item, m_watchers->rootItem()->children)
m_watchers->destroyItem(item);
// Copy over all watchers and mark all watchers as incomplete.
- foreach (const QByteArray &exp, m_watcherNames.keys()) {
+ foreach (const QByteArray &exp, theWatcherNames.keys()) {
WatchData data;
data.iname = watcherName(exp);
data.setAllNeeded();
@@ -1737,9 +1740,9 @@ void WatchHandler::setFormat(const QByteArray &type0, int format)
{
const QByteArray type = stripForFormat(type0);
if (format == -1)
- m_typeFormats.remove(type);
+ theTypeFormats.remove(type);
else
- m_typeFormats[type] = format;
+ theTypeFormats[type] = format;
saveTypeFormats();
m_return->emitDataChanged(1);
m_locals->emitDataChanged(1);
@@ -1751,9 +1754,9 @@ int WatchHandler::format(const QByteArray &iname) const
{
int result = -1;
if (const WatchData *item = findItem(iname)) {
- int result = m_individualFormats.value(item->iname, -1);
+ int result = theIndividualFormats.value(item->iname, -1);
if (result == -1)
- result = m_typeFormats.value(stripForFormat(item->type), -1);
+ result = theTypeFormats.value(stripForFormat(item->type), -1);
}
return result;
}
@@ -1778,8 +1781,8 @@ QByteArray WatchHandler::expansionRequests() const
QByteArray WatchHandler::typeFormatRequests() const
{
QByteArray ba;
- if (!m_typeFormats.isEmpty()) {
- QHashIterator it(m_typeFormats);
+ if (!theTypeFormats.isEmpty()) {
+ QHashIterator it(theTypeFormats);
while (it.hasNext()) {
it.next();
ba.append(it.key().toHex());
@@ -1795,8 +1798,8 @@ QByteArray WatchHandler::typeFormatRequests() const
QByteArray WatchHandler::individualFormatRequests() const
{
QByteArray ba;
- if (!m_individualFormats.isEmpty()) {
- QHashIterator it(m_individualFormats);
+ if (!theIndividualFormats.isEmpty()) {
+ QHashIterator it(theIndividualFormats);
while (it.hasNext()) {
it.next();
ba.append(it.key());
@@ -1911,5 +1914,10 @@ bool WatchHandler::isValidToolTip(const QByteArray &iname) const
return item && !item->type.trimmed().isEmpty();
}
+QHash WatchHandler::watcherNames()
+{
+ return theWatcherNames;
+}
+
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/watchhandler.h b/src/plugins/debugger/watchhandler.h
index 5af4b463a4c..e7ac34b3626 100644
--- a/src/plugins/debugger/watchhandler.h
+++ b/src/plugins/debugger/watchhandler.h
@@ -179,8 +179,7 @@ public:
QSet expandedINames() const
{ return m_expandedINames; }
static QStringList watchedExpressions();
- static QHash watcherNames()
- { return m_watcherNames; }
+ static QHash watcherNames();
QByteArray expansionRequests() const;
QByteArray typeFormatRequests() const;
@@ -222,9 +221,6 @@ private:
typedef QMap > EditHandlers;
EditHandlers m_editHandlers;
- static QHash m_watcherNames;
- static QHash m_typeFormats;
- QHash m_individualFormats; // Indexed by iname.
TypeFormats m_reportedTypeFormats;
// Items expanded in the Locals & Watchers view.
diff --git a/src/plugins/genericprojectmanager/filesselectionwizardpage.cpp b/src/plugins/genericprojectmanager/filesselectionwizardpage.cpp
index f66169ffd5e..82fed7fdb1d 100644
--- a/src/plugins/genericprojectmanager/filesselectionwizardpage.cpp
+++ b/src/plugins/genericprojectmanager/filesselectionwizardpage.cpp
@@ -33,6 +33,7 @@
#include "filesselectionwizardpage.h"
#include "genericprojectwizard.h"
+#include "genericprojectconstants.h"
#include "selectablefilesmodel.h"
#include
@@ -56,7 +57,9 @@ FilesSelectionWizardPage::FilesSelectionWizardPage(GenericProjectWizardDialog *g
hbox->addWidget(m_filterLabel);
m_filterLineEdit = new QLineEdit;
- m_filterLineEdit->setText("Makefile*; *.o; *.obj; *~; *.files; *.config; *.creator; *.user; *.includes");
+ const QString filter = Core::ICore::settings()->value(Constants::FILEFILTER_SETTING,
+ Constants::FILEFILTER_DEFAULT).toString();
+ m_filterLineEdit->setText(filter);
m_filterLineEdit->hide();
hbox->addWidget(m_filterLineEdit);
m_applyFilterButton = new QPushButton(tr("Apply Filter"), this);
@@ -140,5 +143,7 @@ QStringList FilesSelectionWizardPage::selectedFiles() const
void FilesSelectionWizardPage::applyFilter()
{
- m_model->applyFilter(m_filterLineEdit->text());
+ const QString filter = m_filterLineEdit->text();
+ Core::ICore::settings()->setValue(Constants::FILEFILTER_SETTING, filter);
+ m_model->applyFilter(filter);
}
diff --git a/src/plugins/genericprojectmanager/genericprojectconstants.h b/src/plugins/genericprojectmanager/genericprojectconstants.h
index c4fa1ebde4e..0c5560ecf49 100644
--- a/src/plugins/genericprojectmanager/genericprojectconstants.h
+++ b/src/plugins/genericprojectmanager/genericprojectconstants.h
@@ -56,6 +56,9 @@ const char *const GENERICPROJECT_ID = "GenericProjectManager.GenericProject";
const char *const EDITFILESACTION = "GenericProjectManager.EditFiles";
+const char *const FILEFILTER_SETTING = "GenericProject/FileFilter";
+const char *const FILEFILTER_DEFAULT = "Makefile*; *.o; *.obj; *~; *.files; *.config; *.creator; *.user; *.includes";
+
} // namespace Constants
} // namespace GenericProjectManager
diff --git a/src/plugins/genericprojectmanager/selectablefilesmodel.cpp b/src/plugins/genericprojectmanager/selectablefilesmodel.cpp
index 26f2d7e23b9..8246ea4a468 100644
--- a/src/plugins/genericprojectmanager/selectablefilesmodel.cpp
+++ b/src/plugins/genericprojectmanager/selectablefilesmodel.cpp
@@ -31,8 +31,10 @@
**************************************************************************/
#include "selectablefilesmodel.h"
+#include "genericprojectconstants.h"
#include
+#include
#include
#include
@@ -119,6 +121,8 @@ bool SelectableFilesModel::filter(Tree *t)
{
if (t->isDir)
return false;
+ if (m_files.contains(t->fullPath))
+ return false;
foreach (const Glob &g, m_filter) {
if (g.mode == Glob::EXACT) {
if (g.matchString == t->name)
@@ -521,7 +525,9 @@ SelectableFilesDialog::SelectableFilesDialog(const QString &path, const QStringL
hbox->addWidget(m_filterLabel);
m_filterLineEdit = new QLineEdit(this);
- m_filterLineEdit->setText("Makefile*; *.o; *.obj; *~; *.files; *.config; *.creator; *.user; *.includes");
+ const QString filter = Core::ICore::settings()->value(Constants::FILEFILTER_SETTING,
+ Constants::FILEFILTER_DEFAULT).toString();
+ m_filterLineEdit->setText(filter);
m_filterLineEdit->hide();
hbox->addWidget(m_filterLineEdit);
m_applyFilterButton = new QPushButton(tr("Apply Filter"), this);
@@ -611,5 +617,7 @@ QStringList SelectableFilesDialog::selectedFiles() const
void SelectableFilesDialog::applyFilter()
{
- m_selectableFilesModel->applyFilter(m_filterLineEdit->text());
+ const QString filter = m_filterLineEdit->text();
+ Core::ICore::settings()->setValue(Constants::FILEFILTER_SETTING, filter);
+ m_selectableFilesModel->applyFilter(filter);
}
diff --git a/src/plugins/projectexplorer/images/unconfigured.png b/src/plugins/projectexplorer/images/unconfigured.png
index 7966af8d21e..fef0ce4502e 100644
Binary files a/src/plugins/projectexplorer/images/unconfigured.png and b/src/plugins/projectexplorer/images/unconfigured.png differ
diff --git a/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp b/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
index 86e69615379..cb5776c813e 100644
--- a/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
+++ b/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
@@ -42,6 +42,7 @@ namespace Internal {
QmlProfilerCanvas::QmlProfilerCanvas()
: m_context2d(new Context2D(this))
+ , m_dirty(true)
{
setFlag(QGraphicsItem::ItemHasNoContents, false);
setAcceptedMouseButtons(Qt::LeftButton);
diff --git a/src/plugins/qmlprofiler/qmlprofilereventview.cpp b/src/plugins/qmlprofiler/qmlprofilereventview.cpp
index 3630626cacb..169635fec9a 100644
--- a/src/plugins/qmlprofiler/qmlprofilereventview.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilereventview.cpp
@@ -393,6 +393,7 @@ QmlProfilerEventsMainView::~QmlProfilerEventsMainView()
{
clear();
delete d->m_model;
+ delete d;
}
void QmlProfilerEventsMainView::profilerDataModelStateChanged()
diff --git a/src/plugins/qt4projectmanager/wizards/html5app.cpp b/src/plugins/qt4projectmanager/wizards/html5app.cpp
index 95e798bbb59..6c31d8826a1 100644
--- a/src/plugins/qt4projectmanager/wizards/html5app.cpp
+++ b/src/plugins/qt4projectmanager/wizards/html5app.cpp
@@ -315,7 +315,7 @@ QList Html5App::deploymentFolders() const
return result;
}
-const int Html5App::StubVersion = 10;
+const int Html5App::StubVersion = 11;
} // namespace Internal
} // namespace Qt4ProjectManager
diff --git a/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp b/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp
index 7f93b77767d..bde533c272c 100644
--- a/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp
+++ b/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp
@@ -212,7 +212,7 @@ QModelIndex DataModel::indexForObject(const Function *function) const
static QString noWrap(const QString &str)
{
QString escapedStr = str;
- return escapedStr.replace("-", "‑");
+ return escapedStr.replace(QLatin1Char('-'), "‑");
}
QVariant DataModel::data(const QModelIndex &index, int role) const
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp
index 321d70b5041..50c17390642 100644
--- a/src/plugins/welcome/welcomeplugin.cpp
+++ b/src/plugins/welcome/welcomeplugin.cpp
@@ -163,6 +163,7 @@ WelcomeMode::WelcomeMode() :
scrollArea->setWidget(m_welcomePage);
scrollArea->setWidgetResizable(true);
m_welcomePage->setMinimumWidth(860);
+ m_welcomePage->setMinimumHeight(548);
PluginManager *pluginManager = PluginManager::instance();
connect(pluginManager, SIGNAL(objectAdded(QObject*)), SLOT(welcomePluginAdded(QObject*)));
diff --git a/tests/auto/debugger/tst_version.cpp b/tests/auto/debugger/tst_version.cpp
index 1298b0f0fff..0c0ae177b5e 100644
--- a/tests/auto/debugger/tst_version.cpp
+++ b/tests/auto/debugger/tst_version.cpp
@@ -54,13 +54,16 @@ void tst_Version::version()
QFETCH(int, gdbVersion);
QFETCH(int, gdbBuildVersion);
QFETCH(bool, isMacGdb);
+ QFETCH(bool, isQnxGdb);
int v = 0, bv = 0;
bool mac = true;
- Debugger::Internal::extractGdbVersion(msg, &v, &bv, &mac);
- qDebug() << msg << " -> " << v << bv << mac;
+ bool qnx = true;
+ Debugger::Internal::extractGdbVersion(msg, &v, &bv, &mac, &qnx);
+ qDebug() << msg << " -> " << v << bv << mac << qnx;
QCOMPARE(v, gdbVersion);
QCOMPARE(bv, gdbBuildVersion);
QCOMPARE(mac, isMacGdb);
+ QCOMPARE(qnx, isQnxGdb);
}
void tst_Version::version_data()
@@ -69,42 +72,47 @@ void tst_Version::version_data()
QTest::addColumn("gdbVersion");
QTest::addColumn("gdbBuildVersion");
QTest::addColumn("isMacGdb");
+ QTest::addColumn("isQnxGdb");
QTest::newRow("Debian")
<< "GNU gdb (GDB) 7.0.1-debian"
- << 70001 << 0 << false;
+ << 70001 << 0 << false << false;
QTest::newRow("CVS 7.0.90")
<< "GNU gdb (GDB) 7.0.90.20100226-cvs"
- << 70090 << 20100226 << false;
+ << 70090 << 20100226 << false << false;
QTest::newRow("Ubuntu Lucid")
<< "GNU gdb (GDB) 7.1-ubuntu"
- << 70100 << 0 << false;
+ << 70100 << 0 << false << false;
QTest::newRow("Fedora 13")
<< "GNU gdb (GDB) Fedora (7.1-22.fc13)"
- << 70100 << 22 << false;
+ << 70100 << 22 << false << false;
QTest::newRow("Gentoo")
<< "GNU gdb (Gentoo 7.1 p1) 7.1"
- << 70100 << 1 << false;
+ << 70100 << 1 << false << false;
QTest::newRow("Fedora EL5")
<< "GNU gdb Fedora (6.8-37.el5)"
- << 60800 << 37 << false;
+ << 60800 << 37 << false << false;
QTest::newRow("SUSE")
<< "GNU gdb (GDB) SUSE (6.8.91.20090930-2.4)"
- << 60891 << 20090930 << false;
+ << 60891 << 20090930 << false << false;
QTest::newRow("Apple")
<< "GNU gdb 6.3.50-20050815 (Apple version gdb-1461.2)"
- << 60350 << 1461 << true;
+ << 60350 << 1461 << true << false;
QTest::newRow("Apple")
<< "GNU gdb 6.3.50-20050815 (Apple version gdb-960)"
- << 60350 << 960 << true;
+ << 60350 << 960 << true << false;
+
+ QTest::newRow("QNX")
+ << "GNU gdb (GDB) 7.3 qnx (rev. 613)"
+ << 70300 << 613 << false << true;
}
diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp
index 053b42463c7..3ed87877407 100644
--- a/tests/manual/debugger/simple/simple_test_app.cpp
+++ b/tests/manual/debugger/simple/simple_test_app.cpp
@@ -5847,6 +5847,37 @@ namespace bug6858 {
}
}
+
+namespace bug6863 {
+
+ class MyObject : public QObject
+ {
+ Q_OBJECT
+ public:
+ MyObject() {}
+ };
+
+ void setProp(QObject *obj)
+ {
+ obj->setProperty("foo", "bar");
+ BREAK_HERE;
+ // Expand obj.
+ // Check obj.[QObject].properties <2 items>.
+ // Continue.
+ dummyStatement(&obj);
+ }
+
+ void test6863()
+ {
+ QFile file("/tmp/tt");
+ setProp(&file);
+ MyObject obj;
+ setProp(&obj);
+ }
+
+}
+
+
namespace bug6933 {
class Base
@@ -6164,6 +6195,7 @@ int main(int argc, char *argv[])
bug6465::test6465();
bug6857::test6857();
bug6858::test6858();
+ bug6863::test6863();
bug6933::test6933();
gdb13393::test13393();
gdb10586::test10586();