From 87b8a97447b5eafb926d583867029f7a0d3bc16f Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Wed, 4 Feb 2009 19:08:10 +0100 Subject: 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(-) (limited to 'src') diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 718c1f736a..88e145a0e5 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) { -- cgit v1.2.1 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: 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. --- src/plugins/coreplugin/html/images/feedback-text.png | Bin 2968 -> 2217 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'src') diff --git a/src/plugins/coreplugin/html/images/feedback-text.png b/src/plugins/coreplugin/html/images/feedback-text.png index 731bdc50a3..5f6f05843f 100644 Binary files a/src/plugins/coreplugin/html/images/feedback-text.png and b/src/plugins/coreplugin/html/images/feedback-text.png differ -- cgit v1.2.1 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: 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(-) (limited to 'src') diff --git a/src/tools/qtlibspatcher/qtlibspatchermain.cpp b/src/tools/qtlibspatcher/qtlibspatchermain.cpp index b66a35f294..df7a927d41 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; -- cgit v1.2.1 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 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(+) (limited to 'src') diff --git a/src/tools/qtlibspatcher/qtlibspatchermain.cpp b/src/tools/qtlibspatcher/qtlibspatchermain.cpp index df7a927d41..65ffe04928 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/"}, -- cgit v1.2.1 From fa4bab50759e36c6fbdb1baaf581bc2afacdf58d Mon Sep 17 00:00:00 2001 From: dt Date: Thu, 5 Feb 2009 12:01:01 +0100 Subject: Fixes: Also do this for objective_sources, probably they need that to. --- src/shared/proparser/profileevaluator.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index 28a30f2a03..c54b75a1e2 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") -- cgit v1.2.1 From bbef5052dc189b0178768665cce54759506df227 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Thu, 5 Feb 2009 15:06:07 +0100 Subject: 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(-) (limited to 'src') diff --git a/src/tools/qtlibspatcher/qtlibspatchermain.cpp b/src/tools/qtlibspatcher/qtlibspatchermain.cpp index 65ffe04928..ad4e3ae715 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", -- cgit v1.2.1 From 4d4324628a2b51372f164b8ee66c2122ca3fc049 Mon Sep 17 00:00:00 2001 From: dt Date: Thu, 5 Feb 2009 16:22:32 +0100 Subject: 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(+) (limited to 'src') diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 4415a73209..780de4ebc6 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() -- cgit v1.2.1 From 2c4023b5dc8f1d92474e973a483af52939d17cb7 Mon Sep 17 00:00:00 2001 From: dt Date: Thu, 5 Feb 2009 17:19:27 +0100 Subject: 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(-) (limited to 'src') diff --git a/src/plugins/qt4projectmanager/gccparser.cpp b/src/plugins/qt4projectmanager/gccparser.cpp index 1d43e77f57..b71a3362f5 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: Fixed sentence. --- src/plugins/debugger/gdbengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp index fa2d2bacbe..e4b859d6c1 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.") ); -- cgit v1.2.1 From c71edd77631db824b14e1c5e65a2a066254d0c55 Mon Sep 17 00:00:00 2001 From: dt Date: Fri, 6 Feb 2009 13:26:21 +0100 Subject: 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(-) (limited to 'src') diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index 5d05003e8c..b069247b55 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 5d428cc672..d44c5f6738 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: -- cgit v1.2.1 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: Fixed title of dialog --- src/plugins/debugger/breakbyfunction.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/debugger/breakbyfunction.ui b/src/plugins/debugger/breakbyfunction.ui index 06cedb2e46..d6c045219c 100644 --- a/src/plugins/debugger/breakbyfunction.ui +++ b/src/plugins/debugger/breakbyfunction.ui @@ -11,7 +11,7 @@ - Start Debugger + Set Breakpoint at Function -- cgit v1.2.1 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: 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) --- src/plugins/cpptools/completionsettingspage.ui | 11 +- src/plugins/texteditor/behaviorsettingspage.ui | 255 +++++++++++++------------ src/plugins/texteditor/displaysettingspage.ui | 129 ++++++++----- src/plugins/texteditor/fontsettingspage.ui | 4 +- 4 files changed, 224 insertions(+), 175 deletions(-) (limited to 'src') diff --git a/src/plugins/cpptools/completionsettingspage.ui b/src/plugins/cpptools/completionsettingspage.ui index c71a2abc82..a044376bc7 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 e6414918c2..64febb27e5 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. + + + &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 + + - + + + + - Enable automatic &indentation + 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 + Insert &spaces instead of tabs - - - - - - - Interaction Settings - - - - + + - Use "vi" style editing + Enable automatic &indentation - - - - Qt::Vertical - - - - 20 - 8 - - - - diff --git a/src/plugins/texteditor/displaysettingspage.ui b/src/plugins/texteditor/displaysettingspage.ui index 30fdf5cf93..59c8d676b2 100644 --- a/src/plugins/texteditor/displaysettingspage.ui +++ b/src/plugins/texteditor/displaysettingspage.ui @@ -6,70 +6,58 @@ 0 0 - 514 - 194 + 381 + 279 Form - - + + + + Qt::Vertical + + + + 20 + 8 + + + + + + - Display Settings + Display - - - - - - - Display right &margin at column - - - - - - - false - - - 999 - - - - - + - - - Enable text &wrapping - - - - Display line &numbers - - + + - &Visualize whitespace + Display &folding markers - - + + + + Show tabs and spaces. + - Display &folding markers + &Visualize whitespace - + Highlight current &line @@ -79,18 +67,55 @@ - - - - Qt::Vertical - - - - 20 - 8 - + + + + Text Wrapping - + + + + + Enable text &wrapping + + + + + + + + + Display right &margin at column: + + + + + + + false + + + 999 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + diff --git a/src/plugins/texteditor/fontsettingspage.ui b/src/plugins/texteditor/fontsettingspage.ui index 770d5e2935..8aafb751b2 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 -- cgit v1.2.1 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: 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(-) (limited to 'src') diff --git a/src/shared/qtsingleapplication/qtlocalpeer.cpp b/src/shared/qtsingleapplication/qtlocalpeer.cpp index 452d43545a..140e36f46b 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; -- cgit v1.2.1 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: 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(-) (limited to 'src') diff --git a/src/libs/cplusplus/TypePrettyPrinter.cpp b/src/libs/cplusplus/TypePrettyPrinter.cpp index 2784d9d695..31bf658ad3 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 5059a92d8b..b814ed291a 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()) { -- cgit v1.2.1 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: 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(-) (limited to 'src') diff --git a/src/libs/cplusplus/TypePrettyPrinter.cpp b/src/libs/cplusplus/TypePrettyPrinter.cpp index 31bf658ad3..6fd6a2cf24 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; -- cgit v1.2.1 From 3b7c35fa9b452b17b986b719d1914263d472060d Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 4 Feb 2009 12:46:38 +0100 Subject: 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(-) (limited to 'src') diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index c61dbbbe3e..2bd86a6888 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 82c48f37fb..b8bffaa14e 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 7d8072b7ac..e4bb642a48 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 ce3dfdd744..030a57876a 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(); -- cgit v1.2.1