From 87b8a97447b5eafb926d583867029f7a0d3bc16f Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Wed, 4 Feb 2009 19:08:10 +0100 Subject: [PATCH 01/19] fix off by one when selecting block up or the previous open parenthesis. --- src/plugins/texteditor/basetexteditor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 718c1f736ab..88e145a0e58 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -3115,8 +3115,9 @@ bool TextBlockUserData::findPreviousOpenParenthesis(QTextCursor *cursor, bool se if (!parenList.isEmpty() && !TextEditDocumentLayout::ifdefedOut(block)) { for (int i = parenList.count()-1; i >= 0; --i) { Parenthesis paren = parenList.at(i); - if (block == cursor->block() && position - block.position() <= paren.pos + 1) - continue; + if (block == cursor->block() && + (position - block.position() <= paren.pos + (paren.type == Parenthesis::Closed ? 1 : 0))) + continue; if (paren.type == Parenthesis::Closed) { ++ignore; } else if (ignore > 0) { From 89c7c606adb283c76fc7193931847ae0004ab8c0 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 5 Feb 2009 09:50:47 +0100 Subject: [PATCH 02/19] Fixes: compile fix for cplusplus auto test --- tests/auto/cplusplus/shared/shared.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/cplusplus/shared/shared.pro b/tests/auto/cplusplus/shared/shared.pro index 94003e3447e..2f84af560bc 100644 --- a/tests/auto/cplusplus/shared/shared.pro +++ b/tests/auto/cplusplus/shared/shared.pro @@ -5,4 +5,4 @@ CONFIG += static QT = core DEFINES += HAVE_QT CPLUSPLUS_WITH_NAMESPACE -include($$PWD/../../../../shared/cplusplus/cplusplus.pri) +include($$PWD/../../../../src/shared/cplusplus/cplusplus.pri) From c5476c4c2549562ba25315d1e43689cedc84e1b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Thu, 5 Feb 2009 09:57:56 +0100 Subject: [PATCH 03/19] Updated feedback text Agreed with Nigel that Qt Creator shouldn't imply that it's not already great in its feedback text. Changed "better" to "even better", new image by Nigel. --- .../coreplugin/html/images/feedback-text.png | Bin 2968 -> 2217 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/plugins/coreplugin/html/images/feedback-text.png b/src/plugins/coreplugin/html/images/feedback-text.png index 731bdc50a322c6153ed760cb7ca8d6a8b59b010c..5f6f05843fbc0452b31538c8f9666db9199ba255 100644 GIT binary patch literal 2217 zcmeAS@N?(olHy`uVBq!ia0y~yV7S4+z#z%N#K6FC=Ue$|5U0d7q9iy!t)x7$D3!r6 zB|j-u!8128JvAsbF{QHbWU37V1BbV#i(^Q|tv9nHJ;I_zj;{}nycshiO5$vo*>c~M z%s`Q=!6GcJ`HD*vpLu)!h`8Xa;3zOfe-dk?ZH(_MwoUQ7U#a}AS)|tedMMuyEQMg9hk(rNYz`cW15bDZsaD1 zEh&u|CnvEkT58YLu|5C3UBLr~{NlysQCF9*T(oGBy0g@o`WN0F9uZqICg#NMD0ukz zcz^V^oR29ICK&9NxS0 zU6|SV{_x6P^m)?2$o%X3`~USCRUb;8pPOr2{Y}Qc?$3jR&GGx|Y)fB-1P4zJNv^Bg zH@j6Rb^ebhPo5l@I%m$GH#dzLpRS*%?^@f@!MWF``9roGYx%~+9(ntFca<-SOG$OH zs^p)UVL00?w`j}c#qRxwcBGw^Dn6Si@lt!9j>lu&xt?Fn%`{fGv5~nSk$wBvs!f}W z{FmlDd-kko(l<3RuZAgFk!;o-R0@2skRj#7A#!Y*zNg_ zi{}{I(_Piy^`4i%z4i6k+1cB+ZF_jQ{r%nD-~ayp-XOugk-gNWbE;s!87|2OKF>5xza;(Z>udK(GVCYx z{$Aavc6ouoOixeGJh3LFy;(=QL}#1li!F})F!`NodWKVktN*VrFE3A4_xJhs`T2Qu zH8s7M9RZWRJUuPmw{*!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+1*@ zRc&!nyy*P9#_rnn>!yy?0ySSQy8rlF*K|-}VL->CMM^hXO4Y++-326^A|5(Xqe~S5t#Y^#>Qk3F|nZF;KNUzsOU}Sb`6}M()s4in^>c3 z*RJg-e9X3W>(-RiR6)M>iK#P>%T@P$`BKtb$8Z0~;PdCtJ7V-gLYMB_H?OmkbJM0x z79}qPii?Y{T)i3?6y&5McKB^s^5&Z?mhNtDAFB4sSQfQxPCwtZu%MbdI5gBXElq8@ ze*Cf5Uq4+9k54p_s(iV0ddJbEJA13A&zU1rV>kcC?X0a?bCV1TK0Wc=_w$*w-One& zd*bvzfBrnju6EX|S6N9LCF1M-bwv(5i|Nhq7 zZ+D+se>F>0SJ!uoO4?@0?xRfy6C6TAMO+<2LyL-vHbm$wO6lq835bh3xB0wX_rZi4 z+t(V-^brve=`fl+Z=Rotl&IvE1q&D^pLDU2ORuc7d^us-gozrJX`3ZiU-eQDP!Q|R z{NnBHt!!^EzxZOus#Pmib=}Ny3l!mDYknpZwtDKDH#trV1y-#}+8A--<(z3I=9TX;nOn>{j{FdF#eb)JBggyrxio3mYD#tFD-GY4W zk#TWiztoxR1UNQq-RkP-$mq6sqKAsoI$7beo9m(XBPL{ zt@@w#Vt&fm^XH$xy1JT&pFg{*R`$Q-o$^WIA|f01?c0}s{^$M Date: Thu, 5 Feb 2009 10:22:51 +0100 Subject: [PATCH 04/19] Fixes: compile fix for cplusplus autotests --- tests/auto/cplusplus/shared/shared.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/cplusplus/shared/shared.pri b/tests/auto/cplusplus/shared/shared.pri index 175dba7cfea..924cda99911 100644 --- a/tests/auto/cplusplus/shared/shared.pri +++ b/tests/auto/cplusplus/shared/shared.pri @@ -1,5 +1,5 @@ DEFINES += HAVE_QT CPLUSPLUS_WITH_NAMESPACE -INCLUDEPATH += $$PWD/../../../../shared/cplusplus +INCLUDEPATH += $$PWD/../../../../src/shared/cplusplus DEPENDPATH += $$INCLUDEPATH . LIBS += -L$$PWD -lCPlusPlusTestSupport From 71f8cb835fc1ef7228055f6d3a4d8a9b3cd2a982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Thu, 5 Feb 2009 11:04:38 +0100 Subject: [PATCH 05/19] Fixed the libs patcher paths It was taking the wrong length when constructing the new paths. Reviewed-by: Danimo --- src/tools/qtlibspatcher/qtlibspatchermain.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tools/qtlibspatcher/qtlibspatchermain.cpp b/src/tools/qtlibspatcher/qtlibspatchermain.cpp index b66a35f294c..df7a927d413 100644 --- a/src/tools/qtlibspatcher/qtlibspatchermain.cpp +++ b/src/tools/qtlibspatcher/qtlibspatchermain.cpp @@ -136,7 +136,6 @@ char * allocFileNameCopyAppend(const char * textToCopy, Q_ASSERT(textToAppend != NULL); if (textToAppend2 == NULL) textToAppend2 = ""; - Q_ASSERT(textToAppend2 != NULL); char * const res = new char[bytesToAllocate]; const size_t textToCopyLen = strlen(textToCopy); @@ -153,7 +152,7 @@ char * allocFileNameCopyAppend(const char * textToCopy, if (textToAppendLen > 0) strncpy(res + textToCopyLen, textToAppend, bytesToAllocate - textToCopyLen - 1); if (textToAppend2Len > 0) - strncpy(res + textToCopyLen + textToAppend2Len, textToAppend2, bytesToAllocate - textToCopyLen - textToAppend2Len - 1); + strncpy(res + textToCopyLen + textToAppendLen, textToAppend2, bytesToAllocate - textToCopyLen - textToAppendLen - 1); res[textToCopyLen + textToAppendLen + textToAppend2Len] = '\0'; res[bytesToAllocate - 1] = '\0'; // Safe is safe return res; From 2f24b3965f5808644364c937765f823b34a46828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Thu, 5 Feb 2009 11:22:33 +0100 Subject: [PATCH 06/19] Patch also the Qt libraries in lib Apparently these libraries are duplicated on Windows. Reviewed-by: Danimo --- src/tools/qtlibspatcher/qtlibspatchermain.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/tools/qtlibspatcher/qtlibspatchermain.cpp b/src/tools/qtlibspatcher/qtlibspatchermain.cpp index df7a927d413..65ffe049285 100644 --- a/src/tools/qtlibspatcher/qtlibspatchermain.cpp +++ b/src/tools/qtlibspatcher/qtlibspatchermain.cpp @@ -182,6 +182,19 @@ bool patchDebugLibrariesWithQtPath(const char *baseQtPath) {"/bin/QtWebKitd4.dll", "/src/3rdparty/webkit/WebCore/"}, {"/bin/QtXmld4.dll", "/src/xml/"}, {"/bin/QtXmlPatternsd4.dll", "/src/xmlpatterns/"}, + {"/lib/Qt3Supportd4.dll", "/src/qt3support/"}, + {"/lib/QtCored4.dll", "/src/corelib/"}, + {"/lib/QtGuid4.dll", "/src/gui/"}, + {"/lib/QtHelpd4.dll", "/tools/assistant/lib/"}, + {"/lib/QtNetworkd4.dll", "/src/network/"}, + {"/lib/QtOpenGLd4.dll", "/src/opengl/"}, + {"/lib/QtScriptd4.dll", "/src/script/"}, + {"/lib/QtSqld4.dll", "/src/sql/"}, + {"/lib/QtSvgd4.dll", "/src/svg/"}, + {"/lib/QtTestd4.dll", "/src/testlib/"}, + {"/lib/QtWebKitd4.dll", "/src/3rdparty/webkit/WebCore/"}, + {"/lib/QtXmld4.dll", "/src/xml/"}, + {"/lib/QtXmlPatternsd4.dll", "/src/xmlpatterns/"}, {"/plugins/accessible/qtaccessiblecompatwidgetsd4.dll", "/src/plugins/accessible/compat/"}, {"/plugins/accessible/qtaccessiblewidgetsd4.dll", "/src/plugins/accessible/widgets/"}, {"/plugins/codecs/qcncodecsd4.dll", "/src/plugins/codecs/cn/"}, From fa4bab50759e36c6fbdb1baaf581bc2afacdf58d Mon Sep 17 00:00:00 2001 From: dt Date: Thu, 5 Feb 2009 12:01:01 +0100 Subject: [PATCH 07/19] Fixes: Also do this for objective_sources, probably they need that to. --- src/shared/proparser/profileevaluator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index 28a30f2a03b..c54b75a1e2d 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -719,6 +719,7 @@ bool ProFileEvaluator::Private::visitProValue(ProValue *value) // The following two blocks fix bug 180128 by making all "interesting" // file name absolute in each .pro file, not just the top most one if (varName == QLatin1String("SOURCES") + || varName == QLatin1String("OBJECTIVE_SOURCES") || varName == QLatin1String("HEADERS") || varName == QLatin1String("INTERFACES") || varName == QLatin1String("FORMS") From bf7dae57dec51ac2c1997297874295c69980b3e7 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 5 Feb 2009 12:35:37 +0100 Subject: [PATCH 08/19] Fixes: remove use of qttest_p4.prf Details: makes it compile now with Qt snapshots --- tests/auto/cplusplus/ast/ast.pro | 5 +++-- tests/auto/cplusplus/semantic/semantic.pro | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/auto/cplusplus/ast/ast.pro b/tests/auto/cplusplus/ast/ast.pro index 39fd14105de..84733f97e6f 100644 --- a/tests/auto/cplusplus/ast/ast.pro +++ b/tests/auto/cplusplus/ast/ast.pro @@ -1,4 +1,5 @@ -load(qttest_p4) +TEMPLATE = app +CONFIG += qt warn_on console depend_includepath +QT = core testlib include(../shared/shared.pri) -QT = core SOURCES += tst_ast.cpp diff --git a/tests/auto/cplusplus/semantic/semantic.pro b/tests/auto/cplusplus/semantic/semantic.pro index 71a8b5fab5f..37c013685f7 100644 --- a/tests/auto/cplusplus/semantic/semantic.pro +++ b/tests/auto/cplusplus/semantic/semantic.pro @@ -1,5 +1,6 @@ -load(qttest_p4) +TEMPLATE = app +CONFIG += qt warn_on console depend_includepath +QT = core testlib include(../shared/shared.pri) -QT = core SOURCES += tst_semantic.cpp From bbef5052dc189b0178768665cce54759506df227 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Thu, 5 Feb 2009 15:06:07 +0100 Subject: [PATCH 09/19] Fixes: Also Patch QtCore dll in /lib on windows, specify correct path to patch for debug infos --- src/tools/qtlibspatcher/qtlibspatchermain.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/qtlibspatcher/qtlibspatchermain.cpp b/src/tools/qtlibspatcher/qtlibspatchermain.cpp index 65ffe049285..ad4e3ae7156 100644 --- a/src/tools/qtlibspatcher/qtlibspatchermain.cpp +++ b/src/tools/qtlibspatcher/qtlibspatchermain.cpp @@ -42,7 +42,7 @@ #include #ifdef Q_OS_WIN -# define QT_INSTALL_DIR "C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.4.3"; +# define QT_INSTALL_DIR "C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.4.3/qt"; const char * const oldInstallBase = QT_INSTALL_DIR; const char * const oldSourceBase = QT_INSTALL_DIR; @@ -108,7 +108,8 @@ bool patchBinariesWithQtPathes(const char *baseQtPath) #ifdef Q_OS_WIN "/bin/qmake.exe", "/bin/QtCore4.dll", - "/bin/QtCored4.dll" + "/bin/QtCored4.dll", + "/lib/QtCored4.dll" #else "/bin/qmake", "/lib/libQtCore.so", From 4d4324628a2b51372f164b8ee66c2122ca3fc049 Mon Sep 17 00:00:00 2001 From: dt Date: Thu, 5 Feb 2009 16:22:32 +0100 Subject: [PATCH 10/19] Fixes: After adding a new qt version via import, writeSettings() Task: Reported on irc --- src/plugins/qt4projectmanager/qtversionmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 4415a73209c..780de4ebc65 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -112,6 +112,7 @@ void QtVersionManager::addVersion(QtVersion *version) { m_versions.append(version); emit qtVersionsChanged(); + writeVersionsIntoSettings(); } void QtVersionManager::updateDocumentation() From 2c4023b5dc8f1d92474e973a483af52939d17cb7 Mon Sep 17 00:00:00 2001 From: dt Date: Thu, 5 Feb 2009 17:19:27 +0100 Subject: [PATCH 11/19] Fixes: Hopefully parse more gcc/ld errors. Details: If we know don't parse some errors, then i'd like to know. --- src/plugins/qt4projectmanager/gccparser.cpp | 47 ++++++--------------- src/plugins/qt4projectmanager/gccparser.h | 1 - 2 files changed, 14 insertions(+), 34 deletions(-) diff --git a/src/plugins/qt4projectmanager/gccparser.cpp b/src/plugins/qt4projectmanager/gccparser.cpp index 1d43e77f574..b71a3362f55 100644 --- a/src/plugins/qt4projectmanager/gccparser.cpp +++ b/src/plugins/qt4projectmanager/gccparser.cpp @@ -46,14 +46,12 @@ GccParser::GccParser() m_regExpIncluded.setPattern("^.*from\\s([^:]+):(\\d+)(,|:)$"); m_regExpIncluded.setMinimal(true); - m_regExpLinker.setPattern("^(\\S+)\\(\\S+\\):\\s(.+)$"); + m_regExpLinker.setPattern("^(\\S*)\\(\\S+\\):\\s(.+)$"); m_regExpLinker.setMinimal(true); //make[4]: Entering directory `/home/kkoehne/dev/ide-explorer/src/plugins/qtscripteditor' m_makeDir.setPattern("^make.*: (\\w+) directory .(.+).$"); m_makeDir.setMinimal(true); - - m_linkIndent = false; } QString GccParser::name() const @@ -76,7 +74,15 @@ void GccParser::stdOutput(const QString & line) void GccParser::stdError(const QString & line) { QString lne = line.trimmed(); - if (m_regExp.indexIn(lne) > -1) { + if (m_regExpLinker.indexIn(lne) > -1) { + QString description = m_regExpLinker.cap(2); + emit addToTaskWindow( + m_regExpLinker.cap(1), //filename + ProjectExplorer::BuildParserInterface::Error, + -1, //linenumber + description); + //qDebug()<<"m_regExpLinker"< -1) { ProjectExplorer::BuildParserInterface::PatternType type; if (m_regExp.cap(5) == "warning") type = ProjectExplorer::BuildParserInterface::Warning; @@ -86,17 +92,14 @@ void GccParser::stdError(const QString & line) type = ProjectExplorer::BuildParserInterface::Unknown; QString description = m_regExp.cap(6); - if (m_linkIndent) - description.prepend(QLatin1String("-> ")); - //qDebug()< -1) { emit addToTaskWindow( m_regExpIncluded.cap(1), //filename @@ -104,29 +107,7 @@ void GccParser::stdError(const QString & line) m_regExpIncluded.cap(2).toInt(), //linenumber lne //description ); - } else if (m_regExpLinker.indexIn(lne) > -1) { - ProjectExplorer::BuildParserInterface::PatternType type = ProjectExplorer::BuildParserInterface::Error; - QString description = m_regExpLinker.cap(2); - if (lne.endsWith(QLatin1Char(':'))) { - m_linkIndent = true; - } else if (m_linkIndent) { - description.prepend(QLatin1String("-> ")); - type = ProjectExplorer::BuildParserInterface::Unknown; - } - emit addToTaskWindow( - m_regExpLinker.cap(1), //filename - type, - -1, //linenumber - description); + //qDebug()<<"m_regExpInclude"< Date: Fri, 6 Feb 2009 11:20:32 +0100 Subject: [PATCH 12/19] Fixed sentence. --- src/plugins/debugger/gdbengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp index fa2d2bacbe4..e4b859d6c19 100644 --- a/src/plugins/debugger/gdbengine.cpp +++ b/src/plugins/debugger/gdbengine.cpp @@ -3337,7 +3337,7 @@ void GdbEngine::handleQueryDataDumper2(const GdbResultRecord &record) tr("Cannot find special data dumpers"), tr("The debugged binary does not contain information needed for " "nice display of Qt data types.\n\n" - "Try might want to try include the file\n\n" + "You might want to try including the file\n\n" ".../ide/main/bin/gdbmacros/gdbmacros.cpp'\n\n" "into your project directly.") ); From c71edd77631db824b14e1c5e65a2a066254d0c55 Mon Sep 17 00:00:00 2001 From: dt Date: Fri, 6 Feb 2009 13:26:21 +0100 Subject: [PATCH 13/19] Fixes: Finding the ui*.h files so that we can parse those. --- src/plugins/qt4projectmanager/qt4nodes.cpp | 8 ++++---- src/plugins/qt4projectmanager/qt4nodes.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index 5d05003e8ce..b069247b55e 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -540,7 +540,7 @@ Qt4ProFileNode::~Qt4ProFileNode() void Qt4ProFileNode::buildStateChanged(ProjectExplorer::Project *project) { if (project == m_project && !ProjectExplorer::ProjectExplorerPlugin::instance()->buildManager()->isBuilding(m_project)) - updateUiFiles(); + updateUiFiles(m_project->buildDirectory(m_project->activeBuildConfiguration())); } bool Qt4ProFileNode::hasTargets() const @@ -710,7 +710,7 @@ void Qt4ProFileNode::update() emit qt4Watcher->variablesChanged(this, m_varValues, newVarValues); } - updateUiFiles(); + updateUiFiles(m_project->buildDirectory(m_project->activeBuildConfiguration())); foreach (NodesWatcher *watcher, watchers()) if (Qt4NodesWatcher *qt4Watcher = qobject_cast(watcher)) @@ -744,7 +744,7 @@ namespace { // It does so by storing a modification time for each ui file we know about. // TODO this function should also be called if the build directory is changed -void Qt4ProFileNode::updateUiFiles() +void Qt4ProFileNode::updateUiFiles(const QString &buildDirectory) { // Only those two project types can have ui files for us if (m_projectType != ApplicationTemplate @@ -757,7 +757,7 @@ void Qt4ProFileNode::updateUiFiles() const QList uiFiles = uiFilesVisitor.uiFileNodes; // Find the UiDir, there can only ever be one - QString uiDir; // We should default to the build directory + QString uiDir = buildDirectory; QStringList tmp = m_varValues[UiDirVar]; if (tmp.size() != 0) uiDir = tmp.first(); diff --git a/src/plugins/qt4projectmanager/qt4nodes.h b/src/plugins/qt4projectmanager/qt4nodes.h index 5d428cc6720..d44c5f6738b 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.h +++ b/src/plugins/qt4projectmanager/qt4nodes.h @@ -187,7 +187,7 @@ public slots: void scheduleUpdate(); void update(); private slots: - void updateUiFiles(); + void updateUiFiles(const QString& buildConfiguration); void buildStateChanged(ProjectExplorer::Project*); private: From 0bab3d91e6681e171a3454ea030fe0002bd23481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Fri, 6 Feb 2009 14:06:19 +0100 Subject: [PATCH 14/19] Fixed title of dialog --- src/plugins/debugger/breakbyfunction.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/breakbyfunction.ui b/src/plugins/debugger/breakbyfunction.ui index 06cedb2e469..d6c045219c3 100644 --- a/src/plugins/debugger/breakbyfunction.ui +++ b/src/plugins/debugger/breakbyfunction.ui @@ -11,7 +11,7 @@ - Start Debugger + Set Breakpoint at Function From d668b9b1f15d7f0448d7a6cdc7a4e345b2436d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Thu, 5 Feb 2009 14:08:50 +0100 Subject: [PATCH 15/19] Added tooltips to editor settings and tweaked layout Looks a bit nicer now and the tooltips explain some of the options a bit better. Header texts have also been simplified. (cherry picked from commit ad5bdf6969d250bc138f5cd1d2b92be8b5c4dc6d) --- .../cpptools/completionsettingspage.ui | 11 +- .../texteditor/behaviorsettingspage.ui | 263 +++++++++--------- src/plugins/texteditor/displaysettingspage.ui | 133 +++++---- src/plugins/texteditor/fontsettingspage.ui | 4 +- 4 files changed, 230 insertions(+), 181 deletions(-) diff --git a/src/plugins/cpptools/completionsettingspage.ui b/src/plugins/cpptools/completionsettingspage.ui index c71a2abc821..a044376bc74 100644 --- a/src/plugins/cpptools/completionsettingspage.ui +++ b/src/plugins/cpptools/completionsettingspage.ui @@ -17,11 +17,14 @@ - Completion Settings + Code Completion + + Do a case-sensitive match for completion items. + &Case-sensitive completion @@ -32,6 +35,9 @@ + + Automatically insert (, ) and ; when appropriate. + &Automatically insert braces @@ -42,6 +48,9 @@ + + Insert the common prefix of available completion items. + Autocomplete common &prefix diff --git a/src/plugins/texteditor/behaviorsettingspage.ui b/src/plugins/texteditor/behaviorsettingspage.ui index e6414918c22..64febb27e5b 100644 --- a/src/plugins/texteditor/behaviorsettingspage.ui +++ b/src/plugins/texteditor/behaviorsettingspage.ui @@ -6,27 +6,144 @@ 0 0 - 484 - 398 + 428 + 384 Form - - + + - Tab/Indent Settings + Storage - - - + + + + + Removes trailing whitespace on saving. + - Enable automatic &indentation + &Clean whitespace + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 30 + 20 + + + + + + + + false + + + Clean whitespace in entire document instead of only for changed parts. + + + In entire &document + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 30 + 20 + + + + + + + + false + + + Correct leading whitespace according to tab settings. + + + Clean indentation + + + + + + + + + &Ensure newline at end of file + + + + + + + + + + Interaction + + + + + + + + + Use "vi" style editing + + + + + + + + + + Qt::Vertical + + + + 20 + 8 + + + + + + + + Tabs and Indentation + + @@ -89,13 +206,6 @@ - - - - Insert &spaces instead of tabs - - - @@ -145,8 +255,11 @@ - + + + Backspace will go back one indentation level instead of one space. + &Backspace follows indentation @@ -168,121 +281,23 @@ - - - - - - - Storage Settings - - - - - - &Clean whitespace - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 30 - 20 - - - - - - - - false - - - In entire &document - - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 30 - 20 - - - - - - - - false - - - Clean indentation - - - - - - - - - &Ensure newline at end of file - - - - - - - - - - Interaction Settings - - - + - Use "vi" style editing + Insert &spaces instead of tabs + + + + + + + Enable automatic &indentation - - - - Qt::Vertical - - - - 20 - 8 - - - - diff --git a/src/plugins/texteditor/displaysettingspage.ui b/src/plugins/texteditor/displaysettingspage.ui index 30fdf5cf93b..59c8d676b26 100644 --- a/src/plugins/texteditor/displaysettingspage.ui +++ b/src/plugins/texteditor/displaysettingspage.ui @@ -6,26 +6,86 @@ 0 0 - 514 - 194 + 381 + 279 Form + + + + Qt::Vertical + + + + 20 + 8 + + + + + + + + Display + + + + + + Display line &numbers + + + + + + + Display &folding markers + + + + + + + Show tabs and spaces. + + + &Visualize whitespace + + + + + + + Highlight current &line + + + + + + - Display Settings + Text Wrapping - - + + + + + Enable text &wrapping + + + + - Display right &margin at column + Display right &margin at column: @@ -39,59 +99,24 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + - - - - Enable text &wrapping - - - - - - - Display line &numbers - - - - - - - &Visualize whitespace - - - - - - - Display &folding markers - - - - - - - Highlight current &line - - - - - - - Qt::Vertical - - - - 20 - 8 - - - - diff --git a/src/plugins/texteditor/fontsettingspage.ui b/src/plugins/texteditor/fontsettingspage.ui index 770d5e2935c..8aafb751b2f 100644 --- a/src/plugins/texteditor/fontsettingspage.ui +++ b/src/plugins/texteditor/fontsettingspage.ui @@ -23,7 +23,7 @@ - General Font Settings + Font @@ -119,7 +119,7 @@ - Item Specific Settings + Color Scheme From 903457ee6954e40ff41aa01e19e8f6ccbb5c8384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Fri, 6 Feb 2009 14:21:38 +0100 Subject: [PATCH 16/19] Fix compile warning Should be pretty safe to cast the apparently unsigned return value of "sizeof" to a regular integer. --- src/shared/qtsingleapplication/qtlocalpeer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qtsingleapplication/qtlocalpeer.cpp b/src/shared/qtsingleapplication/qtlocalpeer.cpp index 452d43545a3..140e36f46b0 100644 --- a/src/shared/qtsingleapplication/qtlocalpeer.cpp +++ b/src/shared/qtsingleapplication/qtlocalpeer.cpp @@ -143,7 +143,7 @@ void QtLocalPeer::receiveConnection() return; // Why doesn't Qt have a blocking stream that takes care of this shait??? - while (socket->bytesAvailable() < sizeof(quint32)) + while (socket->bytesAvailable() < static_cast(sizeof(quint32))) socket->waitForReadyRead(); QDataStream ds(socket); QByteArray uMsg; From 233502a79542006fe1800bc0865c0a2fdc52af86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Fri, 6 Feb 2009 14:43:13 +0100 Subject: [PATCH 17/19] Fixed tooltips for enumerators The helpId was working but the tooltip text was empty. Reviewed-by: Roberto --- src/libs/cplusplus/TypePrettyPrinter.cpp | 2 ++ src/plugins/cppeditor/cpphoverhandler.cpp | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libs/cplusplus/TypePrettyPrinter.cpp b/src/libs/cplusplus/TypePrettyPrinter.cpp index 2784d9d695a..31bf658ad36 100644 --- a/src/libs/cplusplus/TypePrettyPrinter.cpp +++ b/src/libs/cplusplus/TypePrettyPrinter.cpp @@ -92,6 +92,8 @@ QString TypePrettyPrinter::operator()(const FullySpecifiedType &type, const QStr if (ch.isLetterOrNumber() || ch == QLatin1Char('_')) text += QLatin1Char(' '); text += _name; + } else { + text += name; } (void) switchName(previousName); return text; diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp index 5059a92d8b1..b814ed291aa 100644 --- a/src/plugins/cppeditor/cpphoverhandler.cpp +++ b/src/plugins/cppeditor/cpphoverhandler.cpp @@ -258,6 +258,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in if (!types.isEmpty()) { FullySpecifiedType firstType = types.first().first; + Symbol *symbol = types.first().second; FullySpecifiedType docType = firstType; if (const PointerType *pt = firstType->asPointerType()) { @@ -266,8 +267,8 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in docType = rt->elementType(); } - m_helpId = buildHelpId(docType, types.first().second); - QString displayName = buildHelpId(firstType, types.first().second); + m_helpId = buildHelpId(docType, symbol); + QString displayName = buildHelpId(firstType, symbol); if (!firstType->isClass() && !firstType->isNamedType()) { Overview overview; @@ -297,7 +298,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in m_helpEngineNeedsSetup = false; } - if (! m_toolTip.isEmpty()) + if (!m_toolTip.isEmpty()) m_toolTip = Qt::escape(m_toolTip); if (!m_helpId.isEmpty() && !m_helpEngine->linksForIdentifier(m_helpId).isEmpty()) { From 932845fc368cfd0556d463d7dd210b8f18f4ff96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Fri, 6 Feb 2009 14:47:30 +0100 Subject: [PATCH 18/19] Don't use the name twice, though We shouldn't append the name in cases where the text was not empty but _name was. Reviewed-by: Roberto --- src/libs/cplusplus/TypePrettyPrinter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/cplusplus/TypePrettyPrinter.cpp b/src/libs/cplusplus/TypePrettyPrinter.cpp index 31bf658ad36..6fd6a2cf245 100644 --- a/src/libs/cplusplus/TypePrettyPrinter.cpp +++ b/src/libs/cplusplus/TypePrettyPrinter.cpp @@ -92,8 +92,8 @@ QString TypePrettyPrinter::operator()(const FullySpecifiedType &type, const QStr if (ch.isLetterOrNumber() || ch == QLatin1Char('_')) text += QLatin1Char(' '); text += _name; - } else { - text += name; + } else if (text.isEmpty()) { + text = name; } (void) switchName(previousName); return text; From 3b7c35fa9b452b17b986b719d1914263d472060d Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 4 Feb 2009 12:46:38 +0100 Subject: [PATCH 19/19] Fixes: Toolbar cosmetic problem RevBy: b_lindeijer Details: This resolves the problem with missing top-borders on the find toolbar. (cherry picked from commit e5c845fcc7d84e4cc042fd3f0f1be883e2b4bcb0) --- src/plugins/coreplugin/manhattanstyle.cpp | 7 ++++--- src/plugins/debugger/debuggerplugin.cpp | 1 + src/plugins/find/findtoolbar.cpp | 11 +---------- src/plugins/find/findtoolbar.h | 2 -- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index c61dbbbe3e1..2bd86a68888 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -871,10 +871,11 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt painter->setPen(StyleHelper::borderColor()); if (horizontal) { - // Note: This is a hack to determine if we are the topmost - // toolbar and menu bar should draw the outline + // Note: This is a hack to determine if the + // toolbar should draw the top or bottom outline + // (needed for the find toolbar for instance) QColor lighter(255, 255, 255, 40); - if (widget->mapToParent(rect.topLeft()).y()) { + if (widget && widget->property("topBorder").toBool()) { p->drawLine(rect.topLeft(), rect.topRight()); p->setPen(lighter); p->drawLine(rect.topLeft() + QPoint(0, 1), rect.topRight() + QPoint(0, 1)); diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 82c48f37fb4..b8bffaa14eb 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -620,6 +620,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes m_debugMode->setWidget(splitter2); QToolBar *debugToolBar = new QToolBar; + debugToolBar->setProperty("topBorder", true); debugToolBar->addAction(am->command(ProjectExplorer::Constants::DEBUG)->action()); debugToolBar->addAction(am->command(Constants::INTERRUPT)->action()); debugToolBar->addAction(am->command(Constants::NEXT)->action()); diff --git a/src/plugins/find/findtoolbar.cpp b/src/plugins/find/findtoolbar.cpp index 7d8072b7ac3..e4bb642a48c 100644 --- a/src/plugins/find/findtoolbar.cpp +++ b/src/plugins/find/findtoolbar.cpp @@ -78,6 +78,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen m_ui.setupUi(m_widget); addWidget(m_widget); setFocusProxy(m_ui.findEdit); + setProperty("topBorder", true); connect(m_ui.findEdit, SIGNAL(editingFinished()), this, SLOT(invokeResetIncrementalSearch())); @@ -225,16 +226,6 @@ FindToolBar::~FindToolBar() { } -void FindToolBar::paintEvent(QPaintEvent *event) -{ - QToolBar::paintEvent(event); - - QPainter p(this); - const QRect r = rect(); - p.setPen(StyleHelper::borderColor()); - p.drawLine(r.topLeft(), r.topRight()); -} - bool FindToolBar::eventFilter(QObject *obj, QEvent *event) { if ((obj == m_ui.findEdit || obj == m_findCompleter->popup()) diff --git a/src/plugins/find/findtoolbar.h b/src/plugins/find/findtoolbar.h index ce3dfdd7449..030a57876a3 100644 --- a/src/plugins/find/findtoolbar.h +++ b/src/plugins/find/findtoolbar.h @@ -58,8 +58,6 @@ public: void invokeClearResults(); - void paintEvent(QPaintEvent *event); - private slots: void invokeFindNext(); void invokeFindPrevious();