From 2990e8d23f200aa8ad85575dd04c4c8b101b3cbb Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Thu, 4 Nov 2010 19:05:20 +0100 Subject: [PATCH 01/22] Replace URL for Forum Nokia Support Page Reviewed-by: dt --- src/plugins/welcome/communitywelcomepagewidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/welcome/communitywelcomepagewidget.cpp b/src/plugins/welcome/communitywelcomepagewidget.cpp index ac80277d91d..5ae81c51e6b 100644 --- a/src/plugins/welcome/communitywelcomepagewidget.cpp +++ b/src/plugins/welcome/communitywelcomepagewidget.cpp @@ -47,7 +47,7 @@ struct Site { static const Site supportSites[] = { { QT_TRANSLATE_NOOP("Welcome::Internal::CommunityWelcomePageWidget", "Forum Nokia
Mobile application support"), - "http://www.forum.nokia.com/I_Want_To/Develop_Mobile_Applications/Technical_Support/"}, + "http://www.forum.nokia.com/Support/"}, { QT_TRANSLATE_NOOP("Welcome::Internal::CommunityWelcomePageWidget", "Qt LGPL Support
Buy commercial Qt support"), "http://shop.qt.nokia.com/en/support.html"}, From 09e217f57260eae96e19587a1807078bed68b811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Thu, 4 Nov 2010 18:55:13 +0100 Subject: [PATCH 02/22] Tweaked the deploystep files table a bit Scroll per pixel is nicer and highlighting sections is not useful. Elide mode is now set in the UI file. Also, set a minimum height so that it doesn't go too small. Reviewed-by: Christian Kandeler --- .../qt-maemo/maemodeploystepwidget.cpp | 1 - .../qt-maemo/maemodeploystepwidget.ui | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.cpp index 15482ed2d98..55c9d39b1c3 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.cpp @@ -20,7 +20,6 @@ MaemoDeployStepWidget::MaemoDeployStepWidget(MaemoDeployStep *step) : m_step(step) { ui->setupUi(this); - ui->tableView->setTextElideMode(Qt::ElideMiddle); ui->modelComboBox->setModel(m_step->deployables()); connect(m_step->deployables(), SIGNAL(modelAboutToBeReset()), SLOT(handleModelListToBeReset())); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.ui b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.ui index 9c35f1be744..73d802db90e 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.ui +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.ui @@ -108,6 +108,18 @@ + + + 0 + 150 + + + + Qt::ElideMiddle + + + QAbstractItemView::ScrollPerPixel + false @@ -117,6 +129,9 @@ 400 + + false + 100 From ff976b9861c5789c68fdcc241cb9ab1ed6488c2b Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Fri, 5 Nov 2010 13:40:46 +0100 Subject: [PATCH 03/22] Fix welcome screen with 120 dpi and translations with overlength Task-number: QTCREATORBUG-2984 Reviewed-by: dt --- .../gettingstartedwelcomepagewidget.cpp | 33 +++++-- .../gettingstartedwelcomepagewidget.ui | 97 ++++++++++--------- 2 files changed, 74 insertions(+), 56 deletions(-) diff --git a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp index 12a04588c04..8137cb788c8 100644 --- a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp +++ b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp @@ -86,16 +86,29 @@ GettingStartedWelcomePageWidget::GettingStartedWelcomePageWidget(QWidget *parent connect(ui->tutorialTreeWidget, SIGNAL(activated(QString)), SLOT(slotOpenHelpPage(const QString&))); - ui->tutorialTreeWidget->addItem(tr("The Qt Creator User Interface"), - QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-quick-tour.html")); - ui->tutorialTreeWidget->addItem(tr("Building and Running an Example"), - QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-build-example-application.html?view=split")); - ui->tutorialTreeWidget->addItem(tr("Creating a Qt C++ Application"), - QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-writing-program.html?view=split")); - ui->tutorialTreeWidget->addItem(tr("Creating a Mobile Application"), - QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-mobile-example.html?view=split")); - ui->tutorialTreeWidget->addItem(tr("Creating a Qt Quick Application"), - QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-qml-application.html?view=split")); + QFontMetrics fm = fontMetrics(); + const int margins = 30; + int width = ui->tutorialTreeWidget->minimumWidth() - margins; + + QString itemText = tr("The Qt Creator User Interface"); + QString url = QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-quick-tour.html"); + ui->tutorialTreeWidget->addItem(fm.elidedText(itemText, Qt::ElideRight, width), url, itemText); + + itemText = tr("Building and Running an Example"); + url = QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-build-example-application.html?view=split"); + ui->tutorialTreeWidget->addItem(fm.elidedText(itemText, Qt::ElideRight, width), url, itemText); + + itemText = tr("Creating a Qt C++ Application"); + url = QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-writing-program.html?view=split"); + ui->tutorialTreeWidget->addItem(fm.elidedText(itemText, Qt::ElideRight, width), url, itemText); + + itemText = tr("Creating a Mobile Application"); + url = QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-mobile-example.html?view=split"); + ui->tutorialTreeWidget->addItem(fm.elidedText(itemText, Qt::ElideRight, width), url, itemText); + + itemText = tr("Creating a Qt Quick Application"); + url = QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-qml-application.html?view=split"); + ui->tutorialTreeWidget->addItem(fm.elidedText(itemText, Qt::ElideRight, width), url, itemText); srand(QDateTime::currentDateTime().toTime_t()); QStringList tips = tipsOfTheDay(); diff --git a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui index d04f47be194..788470bf477 100644 --- a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui +++ b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui @@ -52,7 +52,20 @@ - + + + + 260 + 0 + + + + + 260 + 16777215 + + + @@ -67,20 +80,26 @@ - 230 + 240 0 - - + + + 240 + 16777215 + + + 0 + + + 0 + 12 - - 9 - @@ -248,6 +267,9 @@ + + 0 + @@ -316,7 +338,7 @@ - + 6 @@ -368,22 +390,6 @@ - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 40 - - - - @@ -457,28 +463,27 @@ border-bottom: 1px solid "#C9C9C9"; - - - - - Qt::Horizontal - - - - 24 - 38 - - - - - - - - - - - - + + + Qt::Vertical + + + + 20 + 6 + + + + + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + From 4f33fbc229e71f68e14ea0b42e2edd3ab349e7c4 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 27 Oct 2010 08:01:22 +0200 Subject: [PATCH 04/22] QmlJsDebugger: Fix observer navigation on Mac OS X Seems that mouse events aren't sent through the viewport on Mac OS X. --- share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp index 20c9c441628..2e2eef656d0 100644 --- a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp +++ b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp @@ -80,6 +80,7 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view, QObje data->currentTool = data->selectionTool; data->view->setMouseTracking(true); + data->view->installEventFilter(this); data->view->viewport()->installEventFilter(this); data->debugService = QDeclarativeObserverService::instance(); From eac940cd01d1e5bd80d7c51c7b3b262378c037d4 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 5 Nov 2010 15:34:11 +0100 Subject: [PATCH 05/22] QmlInspector: Fix mapping of file names to source dir on Mac Qml Applications by default copy the qml files into XX.app/Contents/Resources in the shadow build directory. Take this into account when trying to find the files in the source directory. Reviewed-by: Alessandro Portale --- src/plugins/qmljsinspector/qmljsinspector.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/qmljsinspector/qmljsinspector.cpp b/src/plugins/qmljsinspector/qmljsinspector.cpp index 997be7ee553..ec85eb6cace 100644 --- a/src/plugins/qmljsinspector/qmljsinspector.cpp +++ b/src/plugins/qmljsinspector/qmljsinspector.cpp @@ -566,6 +566,13 @@ QString InspectorUi::filenameForShadowBuildFile(const QString &filename) const if (projectDir.exists() && buildDir.exists() && fileInfo.exists()) { if (fileInfo.absoluteFilePath().startsWith(buildDir.canonicalPath())) { QString fileRelativePath = fileInfo.canonicalFilePath().mid(debugProjectBuildDirectory().length()); + +#ifdef Q_OS_MACX + // Qt Quick Applications by default copy the qml directory to buildDir()/X.app/Contents/Resources + static QRegExp resourceBundlePattern(QLatin1String("^.*\\.app/Contents/Resources/")); + fileRelativePath.remove(resourceBundlePattern); +#endif + QFileInfo projectFile(projectDir.canonicalPath() + QLatin1Char('/') + fileRelativePath); if (projectFile.exists()) From bb27ed24bf474b6a6855c68683ade77917f6639a Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 5 Nov 2010 16:21:00 +0100 Subject: [PATCH 06/22] Revert "QmlJsDebugger: Fix observer navigation on Mac OS X" This reverts accidentally pushed commit 4f33fbc229e71f68e14ea0b42e2edd3ab349e7c4. --- share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp index 2e2eef656d0..20c9c441628 100644 --- a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp +++ b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp @@ -80,7 +80,6 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view, QObje data->currentTool = data->selectionTool; data->view->setMouseTracking(true); - data->view->installEventFilter(this); data->view->viewport()->installEventFilter(this); data->debugService = QDeclarativeObserverService::instance(); From 8959778083570f4284e745ddbb36a121338b6d57 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Mon, 8 Nov 2010 11:29:44 +0100 Subject: [PATCH 07/22] Fixed regression when completing function templates. Reviewed-by: Erik Verbruggen --- src/plugins/cpptools/cppcodecompletion.cpp | 42 +++++++++++++++++++--- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index f9620f5ca1b..3f1266ec87a 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -1133,6 +1133,40 @@ void CppCodeCompletion::globalCompletion(Scope *currentScope) addMacros(context.thisDocument()->fileName(), context.snapshot()); } +static Scope *enclosingNonTemplateScope(Symbol *symbol) +{ + if (symbol) { + if (Scope *scope = symbol->enclosingScope()) { + if (Template *templ = scope->asTemplate()) + return templ->enclosingScope(); + return scope; + } + } + return 0; +} + +static Function *asFunctionOrTemplateFunctionType(FullySpecifiedType ty) +{ + if (Function *funTy = ty->asFunctionType()) + return funTy; + else if (Template *templ = ty->asTemplateType()) { + if (Symbol *decl = templ->declaration()) + return decl->asFunction(); + } + return 0; +} + +static Class *asClassOrTemplateClassType(FullySpecifiedType ty) +{ + if (Class *classTy = ty->asClassType()) + return classTy; + else if (Template *templ = ty->asTemplateType()) { + if (Symbol *decl = templ->declaration()) + return decl->asClass(); + } + return 0; +} + bool CppCodeCompletion::completeConstructorOrFunction(const QList &results, int endOfExpression, bool toolTipOnly) { @@ -1142,10 +1176,10 @@ bool CppCodeCompletion::completeConstructorOrFunction(const QList &r foreach (const LookupItem &result, results) { FullySpecifiedType exprTy = result.type().simplified(); - if (Class *klass = exprTy->asClassType()) { + if (Class *klass = asClassOrTemplateClassType(exprTy)) { const Name *className = klass->name(); if (! className) - continue; // nothing to do for anonymoous classes. + continue; // nothing to do for anonymous classes. for (unsigned i = 0; i < klass->memberCount(); ++i) { Symbol *member = klass->memberAt(i); @@ -1173,11 +1207,11 @@ bool CppCodeCompletion::completeConstructorOrFunction(const QList &r foreach (const LookupItem &result, results) { FullySpecifiedType ty = result.type().simplified(); - if (Function *fun = ty->asFunctionType()) { + if (Function *fun = asFunctionOrTemplateFunctionType(ty)) { if (! fun->name()) continue; - else if (! functions.isEmpty() && functions.first()->enclosingScope() != fun->enclosingScope()) + else if (! functions.isEmpty() && enclosingNonTemplateScope(functions.first()) != enclosingNonTemplateScope(fun)) continue; // skip fun, it's an hidden declaration. bool newOverload = true; From f07e92e39ba46e15db2eb801f2836c2cbb809c02 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 8 Nov 2010 14:03:17 +0100 Subject: [PATCH 08/22] QmlDesigner.propertyEditor: crash fix We have to check if an AuxiliaryData actually exists. Reviewed-by: Kai Koehne --- .../components/propertyeditor/qmlanchorbindingproxy.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.cpp b/src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.cpp index f987b8e09b5..d9d6de0e1be 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.cpp @@ -271,13 +271,13 @@ void QmlAnchorBindingProxy::resetLayout() { m_fxItemNode.anchors().removeAnchors(); m_fxItemNode.anchors().removeMargins(); - if (qFuzzyCompare(m_fxItemNode.instancePosition().x(), 0.0)) + if (qFuzzyCompare(m_fxItemNode.instancePosition().x(), 0.0) && m_fxItemNode.modelNode().hasAuxiliaryData(auxDataString + "x")) m_fxItemNode.setVariantProperty("x", m_fxItemNode.modelNode().auxiliaryData(auxDataString + "x")); - if (qFuzzyCompare(m_fxItemNode.instancePosition().y(), 0.0)) + if (qFuzzyCompare(m_fxItemNode.instancePosition().y(), 0.0) && m_fxItemNode.modelNode().hasAuxiliaryData(auxDataString + "y")) m_fxItemNode.setVariantProperty("y", m_fxItemNode.modelNode().auxiliaryData(auxDataString + "y")); - if (qFuzzyCompare(m_fxItemNode.instanceSize().width(), 0.0)) + if (qFuzzyCompare(m_fxItemNode.instanceSize().width(), 0.0) && m_fxItemNode.modelNode().hasAuxiliaryData(auxDataString + "width")) m_fxItemNode.setVariantProperty("width", m_fxItemNode.modelNode().auxiliaryData(auxDataString + "width")); - if (qFuzzyCompare(m_fxItemNode.instanceSize().height(), 0.0)) + if (qFuzzyCompare(m_fxItemNode.instanceSize().height(), 0.0) && m_fxItemNode.modelNode().hasAuxiliaryData(auxDataString + "height")) m_fxItemNode.setVariantProperty("height", m_fxItemNode.modelNode().auxiliaryData(auxDataString + "height")); emit topAnchorChanged(); From 66ea47e33a7a75e865ec6cfce3b380e44842267e Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 8 Nov 2010 14:10:43 +0100 Subject: [PATCH 09/22] Maemo: Don't interpret plugins as static libraries in deployment view. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Thorbjørn Lindeijer --- .../qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp index 10cb5e38b59..9c156d82290 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp @@ -216,8 +216,7 @@ QString MaemoDeployableListModel::localExecutableFilePath() const const QStringList &config = m_proFileWrapper->varValues(QLatin1String("CONFIG")); isStatic = config.contains(QLatin1String("static")) - || config.contains(QLatin1String("staticlib")) - || config.contains(QLatin1String("plugin")); + || config.contains(QLatin1String("staticlib")); } fileName += m_targetInfo.target; if (isLib) From d83b0be4ebb598a2d7dab6f20908058a9b0f8378 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 8 Nov 2010 15:14:39 +0100 Subject: [PATCH 10/22] Fixed in-source builds for custom QML extension plug-ins. Check if the output directory is different from the source dir. If so, do the copying magic (shadow build), otherwise skip it (in-source build). Task-number: QTCREATORBUG-3034 Reviewed-by: Alessandro Portale Reviewed-by: Oswald Buddenhagen --- .../templates/wizards/qml-extension/project.pro | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/share/qtcreator/templates/wizards/qml-extension/project.pro b/share/qtcreator/templates/wizards/qml-extension/project.pro index 8a5a9c44e9e..94686cebcab 100644 --- a/share/qtcreator/templates/wizards/qml-extension/project.pro +++ b/share/qtcreator/templates/wizards/qml-extension/project.pro @@ -16,8 +16,10 @@ HEADERS += \ OTHER_FILES = qmldir -copy_qmldir.target = $$OUT_PWD/qmldir -copy_qmldir.depends = $$PWD/qmldir -copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" -QMAKE_EXTRA_TARGETS += copy_qmldir -PRE_TARGETDEPS += $$copy_qmldir.target +!equals(_PRO_FILE_PWD_, $$OUT_PWD) { + copy_qmldir.target = $$OUT_PWD/qmldir + copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir + copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" + QMAKE_EXTRA_TARGETS += copy_qmldir + PRE_TARGETDEPS += $$copy_qmldir.target +} From 1ae598089f18f62907b005a914c915111eb1e428 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 5 Nov 2010 15:00:34 +0100 Subject: [PATCH 11/22] Application Output: Fix linkification of files in shadow builds / deployment folders Try to map absolute paths pointing to files in shadow build directory / on the device to the respective files in the project directory. Task-number: QTCREATORBUG-2371 Reviewed-by: dt --- .../qt4projectmanager/qtoutputformatter.cpp | 48 ++++++++++++++++++- .../qt4projectmanager/qtoutputformatter.h | 1 + 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/src/plugins/qt4projectmanager/qtoutputformatter.cpp b/src/plugins/qt4projectmanager/qtoutputformatter.cpp index 017adc442e6..0878d6aa0bb 100644 --- a/src/plugins/qt4projectmanager/qtoutputformatter.cpp +++ b/src/plugins/qt4projectmanager/qtoutputformatter.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -172,6 +173,48 @@ void QtOutputFormatter::appendLine(QTextCursor &cursor, LinkResult lr, const QSt cursor.insertText(line.mid(lr.end), normalFormat); } +// Map absolute path in shadow build / in the deployment folder to the path in the project directory +// +// Input is e.g. +// C:/app-build-desktop/qml/app/main.qml (shadow build directory) +// C:/Private/e3026d63/qml/app/main.qml (Application data folder on Symbian device) +// /Users/x/app-build-desktop/App.app/Contents/Resources/qml/App/main.qml (folder on Mac OS X) +// which should be mapped to +// $PROJECTDIR/qml/app/main.qml +QString QtOutputFormatter::pathInSourceDirectory(const QString &originalFilePath) +{ + QTC_ASSERT(QFileInfo(originalFilePath).isAbsolute(), return originalFilePath); + + if (!m_project) + return originalFilePath; + + const QString projectDirectory = m_project.data()->projectDirectory(); + + QTC_ASSERT(!projectDirectory.isEmpty(), return originalFilePath); + QTC_ASSERT(!projectDirectory.endsWith(QLatin1Char('/')), return originalFilePath); + + const QChar separator = QLatin1Char('/'); + + if (originalFilePath.startsWith(projectDirectory + separator)) { + return originalFilePath; + } + + // Strip directories one by one from the beginning of the path, + // and see if the new relative path exists in the build directory. + if (originalFilePath.contains(separator)) { + for (int pos = originalFilePath.indexOf(separator); pos != -1; pos = originalFilePath.indexOf(separator, pos + 1)) { + QString candidate = originalFilePath; + candidate.remove(0, pos); + candidate.prepend(projectDirectory); + QFileInfo candidateInfo(candidate); + if (candidateInfo.exists() && candidateInfo.isFile()) + return candidate; + } + } + + return originalFilePath; +} + void QtOutputFormatter::handleLink(const QString &href) { if (!href.isEmpty()) { @@ -181,7 +224,7 @@ void QtOutputFormatter::handleLink(const QString &href) const QString fileName = QUrl(qmlErrorLink.cap(1)).toLocalFile(); const int line = qmlErrorLink.cap(2).toInt(); const int column = qmlErrorLink.cap(3).toInt(); - TextEditor::BaseTextEditor::openEditorAt(fileName, line, column - 1); + TextEditor::BaseTextEditor::openEditorAt(pathInSourceDirectory(fileName), line, column - 1); return; } @@ -221,6 +264,9 @@ void QtOutputFormatter::handleLink(const QString &href) } } } + } else if (!fi.exists()) { + // map possible on-device path to source path + fileName = pathInSourceDirectory(fileName); } TextEditor::BaseTextEditor::openEditorAt(fileName, line, 0); return; diff --git a/src/plugins/qt4projectmanager/qtoutputformatter.h b/src/plugins/qt4projectmanager/qtoutputformatter.h index a62b1c1d7a0..f1ba774d6f9 100644 --- a/src/plugins/qt4projectmanager/qtoutputformatter.h +++ b/src/plugins/qt4projectmanager/qtoutputformatter.h @@ -63,6 +63,7 @@ public: private: LinkResult matchLine(const QString &line) const; void appendLine(QTextCursor & cursor, LinkResult lr, const QString &line, bool onStdError); + QString pathInSourceDirectory(const QString &originalFilePath); QRegExp m_qmlError; QRegExp m_qtError; From 90c4e23748322c39a14f5c32994c92ce3cd74bef Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 8 Nov 2010 16:43:18 +0100 Subject: [PATCH 12/22] Forgotten change in 2a7336b4d661466f31ee487b95ec44d54df88792 Call the new QmlApplicationViewer::showExpanded(); Task-Number: QTCREATORBUG-2979 Reviewed-By: dt --- share/qtcreator/templates/qmlapp/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/templates/qmlapp/main.cpp b/share/qtcreator/templates/qmlapp/main.cpp index f4da658c577..dfb208a90c6 100644 --- a/share/qtcreator/templates/qmlapp/main.cpp +++ b/share/qtcreator/templates/qmlapp/main.cpp @@ -9,7 +9,7 @@ int main(int argc, char *argv[]) viewer.addImportPath(QLatin1String("modules")); // ADDIMPORTPATH viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); // ORIENTATION viewer.setMainQmlFile(QLatin1String("qml/app/main.qml")); // MAINQML - viewer.show(); + viewer.showExpanded(); return app.exec(); } From 64e47901b091fee26379626ef78f3e69ffdfbd50 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 8 Nov 2010 18:14:09 +0100 Subject: [PATCH 13/22] Maemo: Fix SFTP channel leak. Reviewed-by: dt --- .../qt-maemo/maemoremotemounter.cpp | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp index 84fdd1cb614..d6ba3dfc394 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp @@ -169,18 +169,6 @@ void MaemoRemoteMounter::handleUnmountProcessFinished(int exitStatus) void MaemoRemoteMounter::stop() { setState(Inactive); - if (m_utfsClientUploader) { - disconnect(m_utfsClientUploader.data(), 0, this, 0); - m_utfsClientUploader->closeChannel(); - } - if (m_mountProcess) { - disconnect(m_mountProcess.data(), 0, this, 0); - m_mountProcess->closeChannel(); - } - if (m_unmountProcess) { - disconnect(m_unmountProcess.data(), 0, this, 0); - m_unmountProcess->closeChannel(); - } } void MaemoRemoteMounter::deployUtfsClient() @@ -456,8 +444,21 @@ void MaemoRemoteMounter::assertState(const QList &expectedStates, void MaemoRemoteMounter::setState(State newState) { - if (newState == Inactive) + if (newState == Inactive) { m_utfsServerTimer->stop(); + if (m_utfsClientUploader) { + disconnect(m_utfsClientUploader.data(), 0, this, 0); + m_utfsClientUploader->closeChannel(); + } + if (m_mountProcess) { + disconnect(m_mountProcess.data(), 0, this, 0); + m_mountProcess->closeChannel(); + } + if (m_unmountProcess) { + disconnect(m_unmountProcess.data(), 0, this, 0); + m_unmountProcess->closeChannel(); + } + } m_state = newState; } From 3d758f12c4505ffa80395cceb5aec1454c36ff8f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 9 Nov 2010 12:32:33 +0100 Subject: [PATCH 14/22] QmlObserver: Fix compilation if no private headers are installed Use the copy of the qdeclarativedebughelper_p.h that we have in qtcreator instead. Reviewed-by: Christiaan Janssen --- share/qtcreator/qml/qmlobserver/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/qml/qmlobserver/main.cpp b/share/qtcreator/qml/qmlobserver/main.cpp index 464b6a83a8a..baa0fb948e8 100644 --- a/share/qtcreator/qml/qmlobserver/main.cpp +++ b/share/qtcreator/qml/qmlobserver/main.cpp @@ -50,7 +50,7 @@ #include #include #include "qdeclarativetester.h" -#include "private/qdeclarativedebughelper_p.h" +#include "qt_private/qdeclarativedebughelper_p.h" QT_USE_NAMESPACE From 0b2db6129b8f73f9f6e71cbe05b8461577b37fdc Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 9 Nov 2010 12:51:46 +0100 Subject: [PATCH 15/22] Update Polish translations --- share/qtcreator/translations/qtcreator_pl.ts | 578 +++---------------- 1 file changed, 71 insertions(+), 507 deletions(-) diff --git a/share/qtcreator/translations/qtcreator_pl.ts b/share/qtcreator/translations/qtcreator_pl.ts index 84e67fb7c6a..198c428693d 100644 --- a/share/qtcreator/translations/qtcreator_pl.ts +++ b/share/qtcreator/translations/qtcreator_pl.ts @@ -992,10 +992,6 @@ dla emisji sygnału wskoczy bezpośrednio do podłączonego slotu. Class Klasa - - Configure... - Konfiguruj... - %1 - Error %1 - Błąd @@ -1057,7 +1053,7 @@ dla emisji sygnału wskoczy bezpośrednio do podłączonego slotu. Highlight search results - Podświetlaj wyniki poszukiwań + Podświetlaj wyniki wyszukiwań Incremental search @@ -1421,10 +1417,6 @@ dla emisji sygnału wskoczy bezpośrednio do podłączonego slotu. Note that huge amount of commits might take some time. Zwróć uwagę że wyświetlanie dużej liczby zmian może zajmować sporo czasu. - - Omit date from annotation output - Pomijaj daty w wyjściowych adnotacjach - Git Git @@ -1477,10 +1469,6 @@ dla emisji sygnału wskoczy bezpośrednio do podłączonego slotu. Arguments: Argumenty: - - Ignore whitespace changes in annotation and diff - Ignoruj zmiany spacji w adnotacjach i różnicach - Omit date from blame output Pomijaj daty w rezultatach z "blame" @@ -2220,7 +2208,7 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum Copy Project to writable Location? - Kopiować projekt do miejsca zapisywalnego? + Skopiować projekt do miejsca zapisywalnego? <p>The project you are about to open is located in the write-protected location:</p><blockquote>%1</blockquote><p>Please select a writable location below and click "Copy Project and Open" to open a modifiable copy of the project or click "Keep Project and Open" to open the project in location.</p><p><b>Note:</b> You will not be able to alter or compile your project in the current location.</p> @@ -2272,7 +2260,7 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum You can switch between the output pane by hitting <tt>%1+n</tt> where n is the number denoted on the buttons at the window bottom: <br /><br />1: Build Issues, 2: Search Results, 3: Application Output, 4: Compile Output - Możesz przełączać panele wyjściowe naciskając <tt>%1+n</tt> gdzie n jest odpowiednim numerem na przycisku na dole okna:<br /><br />1 - Problemy podczas budowania, 2 - Wyniki poszukiwań, 3 - Komunikaty aplikacji, 4 - Komunikaty kompilatora + Możesz przełączać panele wyjściowe naciskając <tt>%1+n</tt> gdzie n jest odpowiednim numerem na przycisku na dole okna:<br /><br />1 - Problemy podczas budowania, 2 - Wyniki wyszukiwań, 3 - Komunikaty aplikacji, 4 - Komunikaty kompilatora You can quickly search methods, classes, help and more using the <a href="qthelp://com.nokia.qtcreator/doc/creator-editor-locator.html">Locator bar</a> (<tt>%1+K</tt>). @@ -2358,10 +2346,6 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum Explore Qt Quick examples: Poznaj dogłębnie przykłady Qt Quick: - - Explore Qt C++ mobile examples: - Poznaj dogłębnie mobilne przykłady Qt C++: - MakeStep @@ -3471,7 +3455,7 @@ Przyczyna: %3 Cannot perform extensionsInitialized because state != Initialized - Nie można wykonać extensionsInitialized bo stan wtyczki jest inny niż "zainicjowana" + Nie można wykonać "extensionsInitialized" ponieważ stan wtyczek jest inny niż "Initialized" Internal error: have no plugin instance to perform extensionsInitialized @@ -4924,10 +4908,6 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. The header and source file names will be derived from the class name Nazwy pliku nagłówkowego i źródłowego będą zaproponowane na podstawie nazwy klasy - - Configure... - Konfiguruj... - CppEditor::Internal::CppClassWizardDialog @@ -5356,7 +5336,7 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Do you want to commit the change? - Czy chcesz dokonać commita na zmianie? + Czy chcesz dokonać commitu na zmianie? The commit message check failed. Do you want to commit the change? @@ -6116,14 +6096,6 @@ Qt Creator nie może się do niego podłączyć. Debugger::Internal::CoreGdbAdapter - - Error Loading Symbols - Błąd w trakcie ładowania symboli - - - No executable to load symbols from specified. - Nie podano programu z którego można załadować symbole. - Attached to core temporarily. Tymczasowo dołączono do zrzutu. @@ -6312,7 +6284,8 @@ Qt Creator nie może się do niego podłączyć. The Qt version used to build the debugging helpers (%1) does not match the Qt version used to build the debugged application (%2). This might yield incorrect results. - + Wersja Qt użyta do budowy asystentów debuggera (%1) nie odpowiada wersji Qt użytej do budowy debugowanej aplikacji (%2). +Może to spowodować uzyskanie błędnych rezultatów. Custom dumper setup: %1 @@ -6551,7 +6524,7 @@ Możesz poczekać dłużej na odpowiedź lub przerwać debugowanie. The debugger settings point to a script file at '%1' which is not accessible. If a script file is not needed, consider clearing that entry to avoid this warning. - Ustawienia debuggera pokazują na skrypt w "%1" króry nie jest dostępny. Jeśli plik ze skryptem nie jest potrzebny rozważ usunięcie go z ustawień w celu uniknięcia tego ostrzeżenia. + Ustawienia debuggera pokazują na skrypt "%1" który nie jest dostępny. Jeśli plik ze skryptem nie jest potrzebny rozważ usunięcie go z ustawień w celu uniknięcia tego ostrzeżenia. Setting breakpoints... @@ -7851,7 +7824,7 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Search Results - Wyniki poszukiwań + Wyniki wyszukiwań @@ -7995,15 +7968,11 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Delete the master branch after checking out the repository. - Usuń gałąź master po skolowaniu repozytorium. + Usuń gałąź master po sklonowaniu repozytorium. Git::Internal::GitClient - - Note that the git plugin for QtCreator is not able to interact with the server so far. Thus, manual ssh-identification etc. will not work. - Zwróć uwagę że wtyczka git dla Qt Creatora nie współdziała jak dotąd z serwerem. Dlatego też ręczna identyfikacja ssh i inne rzeczy nie będą działać. - Unable to determine the repository for %1. Nie można określić repozytorium dla %1. @@ -8572,10 +8541,6 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Status Stan - - Reset... - Reset... - Clean... Wyczyść... @@ -8616,16 +8581,6 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. &Redo &Przywróć - - Revert all pending changes to the repository -%1? - Odwróć wszystkie oczekujące zmiany dla repozytorium -%1? - - - Revert - Odwróć zmiany - Another submit is currently being executed. Trwa inna wysyłka. @@ -8650,44 +8605,6 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Nie można odnaleźć pliku binarnego "%1" w ścieżce "%2" - - HelloWorld::Internal::HelloWorldPlugin - - Say "&Hello World!" - Powiedz "&Witaj świecie!" - - - &Hello World - &Witaj świecie - - - Hello world! - Witaj świecie! - - - Hello World PushButton! - Przycisk powitalny! - - - Hello World! - Witaj świecie! - - - Hello World! Beautiful day today, isn't it? - Witaj świecie! Piękny dzień dziś mamy, nieprawdaż? - - - - HelloWorld::Internal::HelloWorldWindow - - Focus me to activate my context! - Daj mi fokus, żeby uaktywnić mój kontekst! - - - Hello, world! - Witaj świecie! - - Help::Internal::CentralWidget @@ -9541,14 +9458,6 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Build Environment Środowisko budowania - - No Executable specified. - Nie podano programu wykonywalnego. - - - Running executable: <b>%1</b> %2 - Uruchomiony program: <b>%1</b> %2 - ProjectExplorer::CustomExecutableRunConfiguration @@ -9987,10 +9896,6 @@ Powód: %2 Start Debugging Rozpocznij debugowanie - - F5 - F5 - Add New... Dodaj nowy... @@ -10146,7 +10051,7 @@ No project selected Failed to add subproject '%1' to project '%2'. - Nie można dodac podprojektu "%1" + Nie można dodać podprojektu "%1" do projektu "%2". @@ -10396,7 +10301,7 @@ do projektu "%2". Qt4ProjectManager::Internal::CustomWidgetWizard Qt Custom Designer Widget - Własny widżet Qt Designer + Własny widżet Qt Designera Creates a Qt Custom Designer Widget or a Custom Widget Collection. @@ -10407,7 +10312,7 @@ do projektu "%2". Qt4ProjectManager::Internal::CustomWidgetWizardDialog This wizard generates a Qt4 Designer Custom Widget or a Qt4 Designer Custom Widget Collection project. - Ten kreator generuje projekt własnego widżetu Qt4 Designer lub projekt kolekcji własnych widżetów Qt4 Designer. + Ten kreator generuje projekt własnego widżetu Qt4 Designera lub projekt kolekcji własnych widżetów Qt4 Designera. Custom Widgets @@ -11199,80 +11104,7 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Select the modules you want to include in your project. The recommended modules for this project are selected by default. - Wybierz moduły które chcesz włączyć do projektu. Rekomendowane moduły dla tegp projektu są domyślnie zaznaczone. - - - - QObject - - Pass - Prawidłowy - - - Expected Failure - Oczekiwany błąd - - - Failure - Błąd - - - Expected Pass - Oczekiwany prawidłowy - - - Warning - Ostrzeżenie - - - Qt Warning - Ostrzeżenie Qt - - - Qt Debug - Komunikat debugowy Qt - - - Critical - Błąd krytyczny - - - Fatal - Błąd śmiertelny - - - Skipped - Pominięty - - - Info - Informacja - - - - QTestLib::Internal::QTestOutputPane - - Test Results - Rezultaty testu - - - Result - Rezultat - - - Message - Komunikat - - - - QTestLib::Internal::QTestOutputWidget - - All Incidents - Wszystkie zajścia - - - Show Only: - Pokazuj tylko: + Wybierz moduły które chcesz włączyć do projektu. Rekomendowane moduły dla tego projektu są domyślnie zaznaczone. @@ -11286,89 +11118,6 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Lokalizator - - RegExp::Internal::RegExpWindow - - &Pattern: - &Wzorzec: - - - &Text: - &Tekst: - - - &Minimal - &Minimalistyczny - - - Wildcard - Dżoker - - - &Escaped pattern: - &Zabezpieczony wzorzec: - - - &Pattern syntax: - Składnia &wzorca: - - - Case &sensitive - Uwzględniaj &wielkość liter - - - Index of match: - Indeks dopasowania: - - - Matched length: - Dopasowana długość: - - - Regular Expression v1 - Wyrażenie regularne v1 - - - Regular Expression v2 - Wyrażenie regularne v2 - - - Fixed String - Stały ciąg - - - Capture %1: - Złapanie %1: - - - Match: - Dopasowanie: - - - Regular Expression - Wyrażenie regularne - - - Enter Pattern from Code... - Wprowadź wzorzec z kodu... - - - Clear Patterns - Wyczyść wzorce - - - Clear Text - Wyczyść tekst - - - Enter Pattern from Code - Wprowadź wzorzec z kodu - - - Pattern - Wzorzec - - ResourceEditor::Internal::ResourceEditorPlugin @@ -11395,25 +11144,11 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos nienazwany - - Snippets::Internal::SnippetsPlugin - - Snippets - Urywki - - - - Snippets::Internal::SnippetsWindow - - Snippets - Urywki - - Subversion::Internal::CheckoutWizard Checks out a Subversion repository and tries to load the contained project. - Wyciąga repozytorium Subversion i próbuje załadować zawarty projekt. + Wyciąga repozytorium Subversion i próbuje załadować zawarty projekt. Subversion Checkout @@ -12598,7 +12333,7 @@ Następujące kodowania będą najprawdopodobniej pasowały: IndexWindow &Look for: - Po&szukuj: + Wy&szukaj: Open Link @@ -12719,150 +12454,6 @@ Następujące kodowania będą najprawdopodobniej pasowały: Alias: - - MainWindow - - Bauhaus - MainWindowClass - Bauhaus - - - &File - &Plik - - - &New... - &Nowy... - - - Ctrl+N - - - - &Open... - &Otwórz... - - - Ctrl+O - Ctrl+O - - - Recent Files - Ostatnie pliki - - - &Save - &Zachowaj - - - Ctrl+S - Ctrl+S - - - Save &As... - Zachowaj j&ako... - - - &Preview - &Podgląd - - - Ctrl+R - Ctrl+R - - - &Preview with Debug - &Podgląd z debugowaniem - - - Ctrl+D - Ctrl+D - - - &Quit - Za&kończ - - - &Edit - &Edycja - - - Ctrl+Z - Ctrl+Z - - - Ctrl+Y - Ctrl+Y - - - Ctrl+Shift+Z - Ctrl+Shift+Z - - - &Copy - S&kopiuj - - - &Cut - Wy&tnij - - - &Paste - Wk&lej - - - &Delete - &Usuń - - - Del - Del - - - Backspace - Backspace - - - &View - &Widok - - - &Help - P&omoc - - - &About... - Inform&acje o... - - - Properties - Właściwości - - - Could not open file <%1> - Nie można otworzyć pliku <%1> - - - Qml Errors: - Błędy Qml: - - - -%1 %2:%3 - %4 - -%1 %2:%3 - %4 - - - -%1:%2 - %3 - -%1:%2 - %3 - - - Ctrl+Q - Ctrl+Q - - MimeType @@ -13328,7 +12919,7 @@ aktywny tylko po wpisaniu przedrostka Illegal unicode escape sequence - Niepoprawna unicodowa sekwencja specjalna + Niepoprawna unikodowa sekwencja specjalna Unclosed comment at end of file @@ -14442,7 +14033,7 @@ Możesz odłożyć zmiany lub je porzucić. Deploy Public Key ... - Zainstaluj klucz publiczny... + Instaluj klucz publiczny... Remote device @@ -15361,11 +14952,11 @@ Wartość dziesiętna ze znakiem (big endian): %4 Hg incoming %1 - Hg incoming %1 + Hg incoming %1 Hg outgoing %1 - Hg outgoing %1 + Hg outgoing %1 Working... @@ -15509,11 +15100,11 @@ Wartość dziesiętna ze znakiem (big endian): %4 Incoming... - + Incoming... Outgoing... - + Outgoing... Commit... @@ -16094,6 +15685,10 @@ Wartość dziesiętna ze znakiem (big endian): %4 Parent folder "%1" for file "%2" does not exist. Katalog "%1" dla pliku "%2" nie istnieje. + + Error + Błąd + Cannot write file: "%1". Nie można zapisać pliku: "%1". @@ -16492,7 +16087,7 @@ Wartość dziesiętna ze znakiem (big endian): %4 Refactoring - + Refaktoryzacja Rename id '%1'... @@ -16896,7 +16491,7 @@ Czy uruchomiłeś Qemu? Device error - Błąd urządenia + Błąd urządzenia Fetching environment failed: %1 @@ -16922,17 +16517,17 @@ Czy uruchomiłeś Qemu? WARNING: You want to mount %1 directories, but your device has only %n free ports.<br>You will not be able to run this configuration. - Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie posiada tylko %n wolny port.<br>Nie będzie można uruchomić tej configuracji. - Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie posiada tylko %n wolne porty.<br>Nie będzie można uruchomić tej configuracji. - Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie posiada tylko %n wolnych portów.<br>Nie będzie można uruchomić tej configuracji. + Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie posiada tylko %n wolny port.<br>Nie będzie można uruchomić tej konfiguracji. + Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie posiada tylko %n wolne porty.<br>Nie będzie można uruchomić tej konfiguracji. + Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie posiada tylko %n wolnych portów.<br>Nie będzie można uruchomić tej konfiguracji. WARNING: You want to mount %1 directories, but only %n ports on the device will be available in debug mode. <br>You will not be able to debug your application with this configuration. - Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie udostępnia tylko %n port do debugowania.<br>Nie będzie można debugować aplikacji przy użyciu tej configuracji. - Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie udostępnia tylko %n porty do debugowania.<br>Nie będzie można debugować aplikacji przy użyciu tej configuracji. - Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie udostępnia tylko %n portów do debugowania.<br>Nie będzie można debugować aplikacji przy użyciu tej configuracji. + Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie udostępnia tylko %n port do debugowania.<br>Nie będzie można debugować aplikacji przy użyciu tej konfiguracji. + Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie udostępnia tylko %n porty do debugowania.<br>Nie będzie można debugować aplikacji przy użyciu tej konfiguracji. + Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie udostępnia tylko %n portów do debugowania.<br>Nie będzie można debugować aplikacji przy użyciu tej konfiguracji. @@ -17361,14 +16956,6 @@ Czy uruchomiłeś Qemu? Nie można pozyskać urządzenia na porcie "%1". Wygląda że jest w użyciu. - - AboutDialog - - About Bauhaus - AboutDialog - Informacje o Bauhaus - - CodePaster::FileShareProtocolSettingsWidget @@ -17675,6 +17262,14 @@ should a repository require SSH-authentication (see documentation on SSH and the Anchors Kotwice + + Set anchors + + + + Setting anchors in states is not supported. + + Target Produkt docelowy @@ -17833,7 +17428,7 @@ should a repository require SSH-authentication (see documentation on SSH and the Echo Mode - Tryb echo + Tryb echo Pass. Char @@ -18456,7 +18051,7 @@ Przy obecnej nazwie możesz spodziewać się problemów. The qmake command "%1" was not found or is not executable. %1: Path to qmake executable - Komenda qmake "%1" nie została odnaleziona lub nie jest plikiem wykonywanlym. + Komenda qmake "%1" nie została odnaleziona lub nie jest plikiem wykonywalnym. Qmake does not support build directories below the source directory. @@ -18470,10 +18065,6 @@ Przy obecnej nazwie możesz spodziewać się problemów. Warning: Cannot build QMLObserver; Qt version must be 4.7.1 or higher. Ostrzeżenie: Nie można zbudować QML Observera; wymagana wersja Qt 4.7.1 lub wyższa. - - Warning: Cannot build qmldump; Qt version must be 4.7.1 or higher. - Ostrzeżenie: Nie można zbudować qmldump; wymagana wersja Qt 4.7.1 lub wyższa. - emptyPane @@ -18820,7 +18411,7 @@ Identyfikatory muszą rozpoczynać się małą literą. Amplitude of elastic and bounce easing curves - Amplituda easing curve typu elastic i bounce + Amplituda easing curve typu elastic lub bounce Period @@ -19092,21 +18683,6 @@ aktywny tylko po wpisaniu przedrostka Usuń przyrostek "d" z wersji release'owej - - MaemoDeployableListWidget - - Form - Formularz - - - Add File to Package - Dodaj plik do pakietu - - - Remove File from Package - Usuń plik z pakietu - - MaemoDeployStepWidget @@ -19125,10 +18701,6 @@ aktywny tylko po wpisaniu przedrostka These show the INSTALLS settings from the project file(s). Pokazuje ustawienia INSTALLS dla plików projektu. - - <b>Files to install:</b> - <b>Pliki do zainstalowania:</b> - <b>Files to install for subproject:</b> <b>Pliki do zainstalowania dla podprojektu:</b> @@ -19146,7 +18718,7 @@ aktywny tylko po wpisaniu przedrostka Target UID3: - UID3 prodktu: + UID3 produktu: Enable network access @@ -19185,7 +18757,7 @@ aktywny tylko po wpisaniu przedrostka Target UID3: - UID3 prodktu: + UID3 produktu: @@ -19204,7 +18776,7 @@ aktywny tylko po wpisaniu przedrostka Import an existing .qml file - Zaimportuj isniejący plik .qml + Zaimportuj istniejący plik .qml Note: All files and directories that reside in the same directory as the main QML file are deployed. You can modify the contents of the directory any time before deploying. @@ -19661,6 +19233,10 @@ Lista serwera: %2. Function call failed Funkcja "%1()" zakończona niepowodzeniem: %2 + + An instance of the CDB engine is still running; cannot create an a new instance. + + Version: %1 Wersja: %1 @@ -20567,6 +20143,18 @@ zamiast w jego katalogu instalacyjnym. Previous Open Document in History Poprzedni otwarty dokument w historii + + Go Back + Wstecz + + + Go Forward + W przód + + + Close + Zamknij + Help::Internal::OpenPagesManager @@ -21165,21 +20753,6 @@ Adds the library and include paths to the .pro file. Zdalny katalog - - Qt4ProjectManager::Internal::MaemoDeployableListWidget - - Choose a local file - Wybierz plik lokalny - - - Error adding file - Błąd w trakcie dodawania pliku - - - Error removing file - Błąd w trakcie usuwania pliku - - Qt4ProjectManager::Internal::MaemoDeployStep @@ -21249,7 +20822,7 @@ Adds the library and include paths to the .pro file. Installing package to device... - Instalowanie pakietu na urządzieniu... + Instalowanie pakietu na urządzeniu... Copying file '%1' to path '%2' on the device... @@ -21364,19 +20937,19 @@ Zawartość zdalnego stderr: "%1" No directories to unmount - Brak katalogów do odmontowania + Brak katalogów do zdemontowania Could not execute unmount request. - Nie można wykonać odmontowania. + Nie można wykonać zdemontowania. Failure unmounting: %1 - Błąd odmontowywania: %1 + Błąd demontażu: %1 Finished unmounting. - Odmontowywanie zakończone. + Zakończono demontaż. @@ -21512,7 +21085,7 @@ stderr był: %1 Unmounting host directories... - Odmontowywanie katalogów hosta... + Demontowanie katalogów hosta... @@ -22051,7 +21624,7 @@ Sprawdź prawa dostępu do katalogu. Timeout after %1s. - Bez odpowiedzie po %1s. + Bez odpowiedzi po %1s. The process crashed. @@ -22143,15 +21716,6 @@ Powód: %2 Dodaj definicję w %1 - - QmlDesigner::TextToModelMerger - - Unsupported import: -import QtQuick 1.0 use import Qt 4.7 instead - Nieobsługiwany import: -zamiast "import QtQuick 1.0" użyj "import Qt 4.7" - - QmlJsEditor From b5edda3c32d91754fd7d4ea3592cf2fec3949e86 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 9 Nov 2010 15:07:04 +0100 Subject: [PATCH 16/22] QmlDump: Don't try to build if it can't succeed. Fixes trying to build qmldump for device Qt versions and removes the follow-up warning about it not being possible. Task-number: QTCREATORBUG-3046 Reviewed-by: Lasse Holmstedt Reviewed-by: Kai Koehne --- src/plugins/qt4projectmanager/qmldumptool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qt4projectmanager/qmldumptool.cpp b/src/plugins/qt4projectmanager/qmldumptool.cpp index 64deddcf256..46d849dfa9c 100644 --- a/src/plugins/qt4projectmanager/qmldumptool.cpp +++ b/src/plugins/qt4projectmanager/qmldumptool.cpp @@ -279,7 +279,7 @@ void QmlDumpTool::pathAndEnvironment(ProjectExplorer::Project *project, QString path = Qt4ProjectManager::QmlDumpTool::toolForProject(project); QtVersion *version = qtVersionForProject(project); - if (version && path.isEmpty()) { + if (version && path.isEmpty() && QmlDumpTool::canBuild(version)) { QmlDumpBuildTask *qmlDumpBuildTask = qmlDumpBuilds()->value(version->uniqueId()); if (qmlDumpBuildTask) { if (!qmlDumpBuildTask->hasFailed()) From a534c271ecc5c63015b4b8d2fa55716661dfd3fc Mon Sep 17 00:00:00 2001 From: Leandro Melo Date: Tue, 9 Nov 2010 16:01:58 +0100 Subject: [PATCH 17/22] Generic highlighter: Add Creator's share folder in the fallback definitions search. This leaves the code prepared if we decide to ship some of the Kate XMLs (still a pending decision). In this case the installer needs to be "notified" and the Kate files put in the repo. An addition check for actual XML files in the searched directories is also added. Reviewed-by: con Reviewed-by: Thorbjorn Lindeijer --- share/qtcreator/static.pro | 3 ++- .../generichighlighter/highlightersettings.cpp | 17 ++++++++++++----- .../generichighlighter/highlightersettings.h | 2 +- .../highlightersettingspage.cpp | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/share/qtcreator/static.pro b/share/qtcreator/static.pro index 94d49be3ace..222fef4dfa7 100644 --- a/share/qtcreator/static.pro +++ b/share/qtcreator/static.pro @@ -36,7 +36,8 @@ DATA_DIRS = \ qmlicons \ qml \ qml-type-descriptions \ - qmljsdebugger + qmljsdebugger \ + generic-highlighter !isEmpty(copydata) { diff --git a/src/plugins/texteditor/generichighlighter/highlightersettings.cpp b/src/plugins/texteditor/generichighlighter/highlightersettings.cpp index 2298df67aa5..22c76d789d0 100644 --- a/src/plugins/texteditor/generichighlighter/highlightersettings.cpp +++ b/src/plugins/texteditor/generichighlighter/highlightersettings.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef Q_OS_UNIX #include #endif @@ -43,8 +44,11 @@ namespace TextEditor { namespace Internal { -QString findDefinitionsLocation() +QString findFallbackDefinitionsLocation() { + QDir dir; + dir.setNameFilters(QStringList(QLatin1String("*.xml"))); + #ifdef Q_OS_UNIX static const QLatin1String kateSyntax[] = { QLatin1String("/share/apps/katepart/syntax"), @@ -54,7 +58,6 @@ QString findDefinitionsLocation() sizeof(kateSyntax) / sizeof(kateSyntax[0]); // Some wild guesses. - QDir dir; for (int i = 0; i < kateSyntaxCount; ++i) { QStringList paths; paths << QLatin1String("/usr") + kateSyntax[i] @@ -62,7 +65,7 @@ QString findDefinitionsLocation() << QLatin1String("/opt") + kateSyntax[i]; foreach (const QString &path, paths) { dir.setPath(path); - if (dir.exists()) + if (dir.exists() && !dir.entryInfoList().isEmpty()) return dir.path(); } } @@ -79,13 +82,17 @@ QString findDefinitionsLocation() output.remove(QLatin1Char('\n')); for (int i = 0; i < kateSyntaxCount; ++i) { dir.setPath(output + kateSyntax[i]); - if (dir.exists()) + if (dir.exists() && !dir.entryInfoList().isEmpty()) return dir.path(); } } } #endif + dir.setPath(Core::ICore::instance()->resourcePath() + QLatin1String("/generic-highlighter")); + if (dir.exists() && !dir.entryInfoList().isEmpty()) + return dir.path(); + return QString(); } @@ -139,7 +146,7 @@ void HighlighterSettings::fromSettings(const QString &category, QSettings *s) else m_definitionFilesPath = s->value(kDefinitionFilesPath).toString(); if (!s->contains(kFallbackDefinitionFilesPath)) { - m_fallbackDefinitionFilesPath = findDefinitionsLocation(); + m_fallbackDefinitionFilesPath = findFallbackDefinitionsLocation(); if (m_fallbackDefinitionFilesPath.isEmpty()) m_useFallbackLocation = false; else diff --git a/src/plugins/texteditor/generichighlighter/highlightersettings.h b/src/plugins/texteditor/generichighlighter/highlightersettings.h index 0fbbe7e3eda..323cf833ac3 100644 --- a/src/plugins/texteditor/generichighlighter/highlightersettings.h +++ b/src/plugins/texteditor/generichighlighter/highlightersettings.h @@ -88,7 +88,7 @@ inline bool operator!=(const HighlighterSettings &a, const HighlighterSettings & { return !a.equals(b); } namespace Internal { -QString findDefinitionsLocation(); +QString findFallbackDefinitionsLocation(); } } // namespace TextEditor diff --git a/src/plugins/texteditor/generichighlighter/highlightersettingspage.cpp b/src/plugins/texteditor/generichighlighter/highlightersettingspage.cpp index 44eddbfc795..ffa80862253 100644 --- a/src/plugins/texteditor/generichighlighter/highlightersettingspage.cpp +++ b/src/plugins/texteditor/generichighlighter/highlightersettingspage.cpp @@ -171,7 +171,7 @@ void HighlighterSettingsPage::settingsToUI() void HighlighterSettingsPage::resetDefinitionsLocation() { - const QString &location = findDefinitionsLocation(); + const QString &location = findFallbackDefinitionsLocation(); if (location.isEmpty()) QMessageBox::information(0, tr("Autodetect Definitions"), tr("No pre-installed definitions could be found.")); From ead5b067bf8e2ac836ef56af3cfd1e0efa8ec504 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 9 Nov 2010 16:44:48 +0100 Subject: [PATCH 18/22] QmlDesigner: fix memory leak Reviewed-by: Kai Koehne --- .../qmldesigner/designercore/metainfo/propertymetainfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp index f7c3b1efdbd..2275afb04ef 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp @@ -256,7 +256,7 @@ bool PropertyMetaInfo::isValueType() const throw InvalidMetaInfoException(__LINE__, Q_FUNC_INFO, __FILE__); } - QDeclarativeValueType *valueType(QDeclarativeValueTypeFactory::valueType(variantTypeId())); + QScopedPointer valueType(QDeclarativeValueTypeFactory::valueType(variantTypeId())); return valueType; } From 563b8dc7bfd9fb59598bb1f3971fc2e71e950ee5 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 10 Nov 2010 11:15:19 +0100 Subject: [PATCH 19/22] Maemo: Don't try to re-run run control when run configuration is gone. Quick fix for 2.1. Proper fix is to copy all relevant information at run control creation time. Task-number: https://projects.maemo.org/bugzilla/show_bug.cgi?id=203698 Reviewed-by: dt --- src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp | 2 ++ src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp index a71277ee177..74c3fd1d907 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp @@ -71,6 +71,8 @@ void MaemoRunControl::start() { if (!m_devConfig.isValid()) { handleError(tr("No device configuration set for run configuration.")); + } else if (!m_runConfig) { + handleError(tr("Run configuration no longer available.")); } else { m_running = true; emit started(); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h b/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h index 4f8edb6da98..111fc99465f 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h @@ -39,6 +39,7 @@ #include +#include #include namespace Qt4ProjectManager { @@ -71,7 +72,7 @@ private: void setFinished(); void handleError(const QString &errString); - MaemoRunConfiguration *m_runConfig; // TODO this pointer can be invalid + QPointer m_runConfig; const MaemoDeviceConfig m_devConfig; MaemoSshRunner * const m_runner; bool m_running; From e3eaa2e4776db395fc4133cae0a09d0cb3376cf8 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 10 Nov 2010 11:34:26 +0100 Subject: [PATCH 20/22] QuickToolBar: refine gradient editing This patch solves minor usablity issues in the gradient editing. Reviewed-by: Lasse Holmstedt --- src/libs/qmleditorwidgets/gradientline.cpp | 67 +++++++++++++--------- 1 file changed, 39 insertions(+), 28 deletions(-) diff --git a/src/libs/qmleditorwidgets/gradientline.cpp b/src/libs/qmleditorwidgets/gradientline.cpp index 2c6b9f8c937..66b18217184 100644 --- a/src/libs/qmleditorwidgets/gradientline.cpp +++ b/src/libs/qmleditorwidgets/gradientline.cpp @@ -193,6 +193,8 @@ void GradientLine::paintEvent(QPaintEvent *event) int pos = qreal((width() - 16)) * m_stops.at(i) + 9; p.setBrush(arrowColor); QVector points; + if (localYOffset < -8) + p.setOpacity(0.5); points.append(QPointF(pos + 0.5, 28.5 + localYOffset)); //triangle points.append(QPointF(pos - 3.5, 22.5 + localYOffset)); points.append(QPointF(pos + 4.5, 22.5 + localYOffset)); @@ -210,6 +212,7 @@ void GradientLine::paintEvent(QPaintEvent *event) p.setBrush(Qt::NoBrush); p.setPen(QColor(255, 255, 255, 30)); p.drawRect(pos - 4, 9 + localYOffset, 8, 9); + p.setOpacity(1); } } } @@ -220,6 +223,7 @@ void GradientLine::mousePressEvent(QMouseEvent *event) event->accept(); int xPos = event->pos().x(); int yPos = event->pos().y(); + m_dragStart = event->pos(); int draggedIndex = -1; m_create = false; @@ -227,10 +231,9 @@ void GradientLine::mousePressEvent(QMouseEvent *event) if ((yPos > 10) && (yPos < 30)) for (int i =0; i < m_stops.size(); i++) { int pos = qreal((width() - 16)) * m_stops.at(i) + 9; - if (((xPos + 5) > pos) && ((xPos - 5) < pos)) { + if (((xPos + 8) > pos) && ((xPos - 8) < pos)) { draggedIndex = i; m_dragActive = true; - m_dragStart = event->pos(); setCurrentIndex(draggedIndex); update(); } @@ -253,6 +256,22 @@ void GradientLine::mouseReleaseEvent(QMouseEvent *event) { if (event->button() == Qt::LeftButton) { event->accept(); + + if (m_dragActive) { + m_yOffset += event->pos().y() - 14; + if (m_yOffset > 0) { + m_yOffset = 0; + } else if ((m_yOffset < - 8) && (currentColorIndex()) != 0 && (currentColorIndex() < m_stops.size() - 1)) { + m_yOffset = 0; + m_dragActive = false; + m_stops.removeAt(currentColorIndex()); + m_colorList.removeAt(currentColorIndex()); + updateGradient(); + setCurrentIndex(0); + //delete item + } + } + if (m_dragActive == false && m_create) { qreal stopPos = qreal(event->pos().x() - 9) / qreal((width() - 15)); int index = -1; @@ -260,7 +279,7 @@ void GradientLine::mouseReleaseEvent(QMouseEvent *event) if ((stopPos > m_stops.at(i)) && (index == -1)) index = i +1; } - if (index != -1 && (m_useGradient)) { //creating of items only in base state + if (index != -1 && (m_useGradient) && abs(m_dragStart.x() - event->pos().x()) < 10) { //creating of items only in base state m_stops.insert(index, stopPos); m_colorList.insert(index, QColor(Qt::white)); setCurrentIndex(index); @@ -278,32 +297,24 @@ void GradientLine::mouseMoveEvent(QMouseEvent *event) { if (m_dragActive) { event->accept(); - int xPos = event->pos().x(); int pos = qreal((width() - 20)) * m_stops.at(currentColorIndex()) + 8; - int offset = m_dragOff ? 2 : 20; - if (xPos < pos + offset && xPos > pos - offset) { - m_dragOff = false; - int xDistance = event->pos().x() - m_dragStart.x(); - qreal distance = qreal(xDistance) / qreal((width() - 20)); - qreal newStop = m_stops.at(currentColorIndex()) + distance; - if ((newStop >=0) && (newStop <= 1)) - m_stops[currentColorIndex()] = newStop; - m_yOffset += event->pos().y() - m_dragStart.y(); - if (m_yOffset > 0) { //deleting only in base state - m_yOffset = 0; - } else if ((m_yOffset < - 12) && (currentColorIndex()) != 0 && (currentColorIndex() < m_stops.size() - 1)) { - m_yOffset = 0; - m_dragActive = false; - m_stops.removeAt(currentColorIndex()); - m_colorList.removeAt(currentColorIndex()); - updateGradient(); - setCurrentIndex(0); - //delete item - } - } else { - m_dragOff = true; - } - m_dragStart = event->pos(); + + m_dragOff = false; + int xDistance = event->pos().x() - pos; + qreal distance = qreal(xDistance) / qreal((width() - 20)); + qreal newStopPosition = m_stops.at(currentColorIndex()) + distance; + if (newStopPosition > 0.98) //snap to 1 + newStopPosition = 1; + if (newStopPosition < 0.02) //snap to 0 + newStopPosition = 0; + if ((newStopPosition >=0) && (newStopPosition <= 1)) + m_stops[currentColorIndex()] = newStopPosition; + m_yOffset += event->pos().y() - 14; + if (m_yOffset > 0) + m_yOffset = 0; + else if ((m_yOffset < - 10)) + m_yOffset = -10; + update(); } } From 95fea0bfc1dbd528f34b0a2d5860a225c2087e5c Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 10 Nov 2010 11:39:58 +0100 Subject: [PATCH 21/22] QmlDesigner.itemLibrary: use pixelSize instead of pointSize as default. Since all units in qml are usually pixels and mobile devices usually have much higher dpi than desktop screens, specifing font sizes in points is usually not what a user wants to do. Reviewed-by: Kai Koehne --- src/plugins/qmldesigner/qtquickplugin/quick.metainfo | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo index 139a82bc056..781e6352cb7 100644 --- a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo +++ b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo @@ -21,6 +21,7 @@ + @@ -30,6 +31,7 @@ + @@ -39,6 +41,7 @@ + From fb46c31934c44ee1f83075b5f3647df4eec588c7 Mon Sep 17 00:00:00 2001 From: Leandro Melo Date: Wed, 10 Nov 2010 15:09:18 +0100 Subject: [PATCH 22/22] Plain text editor: Make sure user setting about folding markers is used It was being reset based on the highlighter definitions. Consider some refactoring with the related options as well to avoid overriding user's settings. Done-with: Thorbjorn Lindeijer --- src/plugins/cppeditor/cppeditor.cpp | 1 - src/plugins/qmljseditor/qmljseditor.cpp | 1 - src/plugins/texteditor/basetexteditor.cpp | 12 ++++++++---- src/plugins/texteditor/basetexteditor.h | 2 +- src/plugins/texteditor/plaintexteditor.cpp | 2 -- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 66bb2b7986d..10a3600b483 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -410,7 +410,6 @@ CPPEditor::CPPEditor(QWidget *parent) setParenthesesMatchingEnabled(true); setMarksVisible(true); setCodeFoldingSupported(true); - setCodeFoldingVisible(true); baseTextDocument()->setSyntaxHighlighter(new CppHighlighter); m_modelManager = CppTools::CppModelManagerInterface::instance(); diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp index abbb818a117..fccae1942d6 100644 --- a/src/plugins/qmljseditor/qmljseditor.cpp +++ b/src/plugins/qmljseditor/qmljseditor.cpp @@ -689,7 +689,6 @@ QmlJSTextEditor::QmlJSTextEditor(QWidget *parent) : setParenthesesMatchingEnabled(true); setMarksVisible(true); setCodeFoldingSupported(true); - setCodeFoldingVisible(true); m_updateDocumentTimer = new QTimer(this); m_updateDocumentTimer->setInterval(UPDATE_DOCUMENT_DEFAULT_INTERVAL); diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index eaa36330c72..deac6a18311 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -1807,10 +1807,13 @@ bool BaseTextEditor::lineSeparatorsAllowed() const return d->m_lineSeparatorsAllowed; } -void BaseTextEditor::setCodeFoldingVisible(bool b) +void BaseTextEditor::updateCodeFoldingVisible() { - d->m_codeFoldingVisible = b && d->m_codeFoldingSupported; - slotUpdateExtraAreaWidth(); + const bool visible = d->m_codeFoldingSupported && d->m_displaySettings.m_displayFoldingMarkers; + if (d->m_codeFoldingVisible != visible) { + d->m_codeFoldingVisible = visible; + slotUpdateExtraAreaWidth(); + } } bool BaseTextEditor::codeFoldingVisible() const @@ -1827,6 +1830,7 @@ bool BaseTextEditor::codeFoldingVisible() const void BaseTextEditor::setCodeFoldingSupported(bool b) { d->m_codeFoldingSupported = b; + updateCodeFoldingVisible(); } bool BaseTextEditor::codeFoldingSupported() const @@ -5124,7 +5128,6 @@ void BaseTextEditor::setDisplaySettings(const DisplaySettings &ds) setLineWrapMode(ds.m_textWrapping ? QPlainTextEdit::WidgetWidth : QPlainTextEdit::NoWrap); setLineNumbersVisible(ds.m_displayLineNumbers); setVisibleWrapColumn(ds.m_showWrapColumn ? ds.m_wrapColumn : 0); - setCodeFoldingVisible(ds.m_displayFoldingMarkers); setHighlightCurrentLine(ds.m_highlightCurrentLine); setRevisionsVisible(ds.m_markTextChanges); setCenterOnScroll(ds.m_centerCursorOnScroll); @@ -5147,6 +5150,7 @@ void BaseTextEditor::setDisplaySettings(const DisplaySettings &ds) d->m_highlightBlocksInfo = BaseTextEditorPrivateHighlightBlocks(); } + updateCodeFoldingVisible(); updateHighlights(); viewport()->update(); extraArea()->update(); diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h index aa19330753a..d17b6993233 100644 --- a/src/plugins/texteditor/basetexteditor.h +++ b/src/plugins/texteditor/basetexteditor.h @@ -207,7 +207,7 @@ public: void setLineSeparatorsAllowed(bool b); bool lineSeparatorsAllowed() const; - void setCodeFoldingVisible(bool b); + void updateCodeFoldingVisible(); bool codeFoldingVisible() const; void setCodeFoldingSupported(bool b); diff --git a/src/plugins/texteditor/plaintexteditor.cpp b/src/plugins/texteditor/plaintexteditor.cpp index ea1a0b0a2c2..e3cb3fff56c 100644 --- a/src/plugins/texteditor/plaintexteditor.cpp +++ b/src/plugins/texteditor/plaintexteditor.cpp @@ -164,7 +164,6 @@ void PlainTextEditor::configure(const Core::MimeType &mimeType) baseTextDocument()->setSyntaxHighlighter(highlighter); setCodeFoldingSupported(false); - setCodeFoldingVisible(false); if (!mimeType.isNull()) { m_isMissingSyntaxDefinition = true; @@ -189,7 +188,6 @@ void PlainTextEditor::configure(const Core::MimeType &mimeType) m_commentDefinition.setMultiLineEnd(definition->multiLineCommentEnd()); setCodeFoldingSupported(true); - setCodeFoldingVisible(true); } } else if (file()) { const QString &fileName = file()->fileName();