From 164ec20b9ed3cfd1c1c705032902330b56b33850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 2 Feb 2009 12:14:59 +0100 Subject: [PATCH 01/16] Fixed crash on applying or changing settings The m_page member used to access the widgets was deleted too early. Deletion moved to finish() method. --- src/plugins/coreplugin/dialogs/shortcutsettings.cpp | 4 ++-- src/plugins/coreplugin/generalsettings.cpp | 7 ++++++- src/plugins/coreplugin/generalsettings.h | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp index 6797a50888e..33d83f67efb 100644 --- a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp +++ b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp @@ -116,8 +116,6 @@ QWidget *ShortcutSettings::createPage(QWidget *parent) commandChanged(0); - delete m_page; - return w; } @@ -131,6 +129,8 @@ void ShortcutSettings::finish() { qDeleteAll(m_scitems); m_scitems.clear(); + + delete m_page; } bool ShortcutSettings::eventFilter(QObject *o, QEvent *e) diff --git a/src/plugins/coreplugin/generalsettings.cpp b/src/plugins/coreplugin/generalsettings.cpp index b21db43fa35..f2b51c1204c 100644 --- a/src/plugins/coreplugin/generalsettings.cpp +++ b/src/plugins/coreplugin/generalsettings.cpp @@ -77,7 +77,7 @@ QWidget *GeneralSettings::createPage(QWidget *parent) this, SLOT(resetExternalEditor())); connect(m_page->helpExternalEditorButton, SIGNAL(clicked()), this, SLOT(showHelpForExternalEditor())); - delete m_page; + return w; } @@ -88,6 +88,11 @@ void GeneralSettings::apply() EditorManager::instance()->setExternalEditor(m_page->externalEditorEdit->text()); } +void GeneralSettings::finish() +{ + delete m_page; +} + void GeneralSettings::resetInterfaceColor() { m_page->colorButton->setColor(0x666666); diff --git a/src/plugins/coreplugin/generalsettings.h b/src/plugins/coreplugin/generalsettings.h index aff4d0c8809..f31edf2cfb4 100644 --- a/src/plugins/coreplugin/generalsettings.h +++ b/src/plugins/coreplugin/generalsettings.h @@ -56,7 +56,7 @@ public: QString trCategory() const; QWidget* createPage(QWidget *parent); void apply(); - void finish() { } + void finish(); private slots: void resetInterfaceColor(); From 073734b8f779b0d1d31ea4b802388c997368e78e Mon Sep 17 00:00:00 2001 From: con Date: Mon, 2 Feb 2009 14:04:14 +0100 Subject: [PATCH 02/16] Fixes: - Resource editor doesn't allow to add files without ext --- src/shared/qrceditor/resourceview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qrceditor/resourceview.cpp b/src/shared/qrceditor/resourceview.cpp index cb010f0f4b9..94df537f2ce 100644 --- a/src/shared/qrceditor/resourceview.cpp +++ b/src/shared/qrceditor/resourceview.cpp @@ -413,7 +413,7 @@ QStringList ResourceView::fileNamesToAdd() { return QFileDialog::getOpenFileNames(this, tr("Open file"), m_qrcModel->absolutePath(QString()), - tr("All files (*.*)")); + tr("All files (*)")); } void ResourceView::onAddFiles() From 259357ed57f56b76e990d2425211b6d9dbaf34c3 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 2 Feb 2009 14:15:16 +0100 Subject: [PATCH 03/16] Fixes: compile fix with namespaced Qt Task: 180315 --- src/plugins/qt4projectmanager/qt4runconfiguration.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.h b/src/plugins/qt4projectmanager/qt4runconfiguration.h index ce1d44769e0..0913fc0861c 100644 --- a/src/plugins/qt4projectmanager/qt4runconfiguration.h +++ b/src/plugins/qt4projectmanager/qt4runconfiguration.h @@ -38,9 +38,11 @@ #include #include +QT_BEGIN_NAMESPACE class QWidget; class QLabel; class QLineEdit; +QT_END_NAMESPACE namespace Qt4ProjectManager { From 4fc1856d7f8475be27d1ae7e83d955169fc88a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 2 Feb 2009 16:17:23 +0100 Subject: [PATCH 04/16] Don't open an editor when not clicking on a search result This basically reverts change 01933445dae09206208cc74704c5b515d42798f3 --- src/plugins/find/searchresulttreeview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/find/searchresulttreeview.cpp b/src/plugins/find/searchresulttreeview.cpp index 3b51d9e0c1d..6887fa9bf80 100644 --- a/src/plugins/find/searchresulttreeview.cpp +++ b/src/plugins/find/searchresulttreeview.cpp @@ -76,6 +76,9 @@ void SearchResultTreeView::appendResultLine(int index, const QString &fileName, void SearchResultTreeView::emitJumpToSearchResult(const QModelIndex &index) { + if (model()->data(index, ItemDataRoles::TypeRole).toString().compare("row") != 0) + return; + QString fileName = model()->data(index, ItemDataRoles::FileNameRole).toString(); int position = model()->data(index, ItemDataRoles::ResultIndexRole).toInt(); int lineNumber = model()->data(index, ItemDataRoles::ResultLineNumberRole).toInt(); From e08f1763b7534173fcb540c6ac981aae74d902c6 Mon Sep 17 00:00:00 2001 From: dt Date: Mon, 2 Feb 2009 18:06:26 +0100 Subject: [PATCH 05/16] Fixes: Workaround a bug in kde 4.2.0. Task: Reported on irc. Details: We did regiser all plugins but didn't initialize them. Leading to the kde plugins installing a kde file dialog, but not initializing a KComponentData, which leads to a crash when trying to open a file dialog. So we aren't lazy anymore with the designer plugins. And initialize them right away. We should reenable lazy initializing once kde 4.2.1 has been released. (And probably has replaced kde 4.2.0 on most systems.) --- src/plugins/designer/formeditorplugin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/designer/formeditorplugin.cpp b/src/plugins/designer/formeditorplugin.cpp index 823efb590d1..862b29cb46e 100644 --- a/src/plugins/designer/formeditorplugin.cpp +++ b/src/plugins/designer/formeditorplugin.cpp @@ -108,7 +108,11 @@ bool FormEditorPlugin::initialize(const QStringList &arguments, QString *error) addObject(m_factory); // Make sure settings pages and action shortcuts are registered - FormEditorW::ensureInitStage(FormEditorW::RegisterPlugins); + // TODO we don't want to do a full initialization here, + // we actually want to call ensureInitStage(FormEditorW::RegisterPlugins) + // But due to a bug in kde 4.2.0 this crashes then when opening the file dialog + // This should be removed after 4.2.1 is out + FormEditorW::ensureInitStage(FormEditorW::FullyInitialized); error->clear(); return true; From b100baedcd639e0aeb9ab403c3927e49d456f91a Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Feb 2009 11:39:18 +0100 Subject: [PATCH 06/16] Fixes: do not emit startupProjectChanged() if the startup project has not changed. Details: saves a few cycles --- src/plugins/projectexplorer/session.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 88f7b53e559..a8e14e98689 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -527,6 +527,9 @@ void SessionManager::setStartupProject(Project *startupProject) Q_ASSERT(m_file->m_projects.contains(startupProject)); } + if (m_file->m_startupProject == startupProject) + return; + m_file->m_startupProject = startupProject; emit startupProjectChanged(startupProject); } From 63a5f15f9d5e287debe8944259ded24b719570b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Tue, 3 Feb 2009 11:37:38 +0100 Subject: [PATCH 07/16] Don't replace . with -> in case of primitive types Reviewed-by: Roberto Raggi --- src/plugins/cpptools/cppcodecompletion.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index df68e5778dc..b6bac92bf9b 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -689,12 +689,14 @@ bool CppCodeCompletion::completeMember(const QList &re } if (PointerType *ptrTy = ty->asPointerType()) { - // Replace . with -> - int length = m_editor->position() - m_startPosition + 1; - m_editor->setCurPos(m_startPosition - 1); - m_editor->replace(length, QLatin1String("->")); - ++m_startPosition; - namedTy = ptrTy->elementType()->asNamedType(); + if (ptrTy->elementType()->isNamedType()) { + // Replace . with -> + int length = m_editor->position() - m_startPosition + 1; + m_editor->setCurPos(m_startPosition - 1); + m_editor->replace(length, QLatin1String("->")); + ++m_startPosition; + namedTy = ptrTy->elementType()->asNamedType(); + } } else { namedTy = ty->asNamedType(); if (! namedTy) { From f1a40d304b105b9116f78de58ae398a4403e215c Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Tue, 3 Feb 2009 12:50:53 +0100 Subject: [PATCH 08/16] Fixes: Member completion when the symbol's type is ClassTy. For example, struct { int a, b } foo; int main() { foo. <- } --- src/plugins/cpptools/cppcodecompletion.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index b6bac92bf9b..1f5bb7e1f4e 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -598,7 +598,9 @@ bool CppCodeCompletion::completeMember(const QList &re if (ReferenceType *refTy = ty->asReferenceType()) ty = refTy->elementType(); - if (NamedType *namedTy = ty->asNamedType()) { + if (Class *classTy = ty->asClass()) { + classObjectCandidates.append(classTy); + } else if (NamedType *namedTy = ty->asNamedType()) { // ### This code is pretty slow. const QList candidates = context.resolve(namedTy->name()); foreach (Symbol *candidate, candidates) { @@ -697,6 +699,8 @@ bool CppCodeCompletion::completeMember(const QList &re ++m_startPosition; namedTy = ptrTy->elementType()->asNamedType(); } + } else if (Class *classTy = ty->asClass()) { + classObjectCandidates.append(classTy); } else { namedTy = ty->asNamedType(); if (! namedTy) { From ba8513a0fa0b6566db70767d3a4c50f95dd68785 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Mon, 2 Feb 2009 18:50:14 +0100 Subject: [PATCH 09/16] Fixes: Build on windows --- src/tools/qtlibspatcher/binpatch.cpp | 7 +++++++ src/tools/qtlibspatcher/qtlibspatchermain.cpp | 16 ++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/tools/qtlibspatcher/binpatch.cpp b/src/tools/qtlibspatcher/binpatch.cpp index 7e1dcfbbdd8..43e5fd84c8e 100644 --- a/src/tools/qtlibspatcher/binpatch.cpp +++ b/src/tools/qtlibspatcher/binpatch.cpp @@ -35,7 +35,14 @@ #include #include +#include + #include "binpatch.h" + +#ifdef Q_OS_WIN +# define strcasecmp _stricmp +# define strncasecmp _strnicmp +#endif // returns positive value if it finds a null termination inside the buffer long BinPatch::getBufferStringLength(char *data, char *end) diff --git a/src/tools/qtlibspatcher/qtlibspatchermain.cpp b/src/tools/qtlibspatcher/qtlibspatchermain.cpp index c186b8a895d..b66a35f294c 100644 --- a/src/tools/qtlibspatcher/qtlibspatchermain.cpp +++ b/src/tools/qtlibspatcher/qtlibspatchermain.cpp @@ -42,8 +42,10 @@ #include #ifdef Q_OS_WIN - const char * const oldInstallBase = "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"; + + const char * const oldInstallBase = QT_INSTALL_DIR; + const char * const oldSourceBase = QT_INSTALL_DIR; #else const char * const oldSourceBase = "/home/berlin/dev/qt-4.4.3-temp/qt-x11-opensource-src-4.4.3"; const char * const oldInstallBase = "/home/berlin/dev/qt-4.4.3-shipping/qt"; @@ -627,9 +629,9 @@ void patchQMakeSpec(const char *path) out << all; } +#ifndef Q_OS_WIN const char * const textFileFileNames[] = { -#ifndef Q_OS_WIN // *.la "/lib/libQtCore.la", "/lib/libQt3Support.la", @@ -692,8 +694,8 @@ const char * const textFileFileNames[] = // misc "/mkspecs/qconfig.pri" -#endif }; +#endif void replaceInTextFile(const char * fileName, const char * oldText, const char * newText, @@ -726,6 +728,7 @@ void replaceInTextFile(const char * fileName, void patchTextFiles(const char *newInstallBase) { +#ifndef Q_OS_WIN const char * const baseQtPath = newInstallBase; const char * const newSourceBase = newInstallBase; const int fileCount = sizeof(textFileFileNames) / sizeof(const char *); @@ -733,16 +736,13 @@ void patchTextFiles(const char *newInstallBase) char * const fileName = allocFileNameCopyAppend(baseQtPath, textFileFileNames[i]); logFileName(fileName); logDiff(oldSourceBase, newSourceBase); -#ifndef Q_OS_WIN logDiff(oldInstallBase, newInstallBase); -#endif replaceInTextFile(fileName, -#ifndef Q_OS_WIN oldSourceBase, newSourceBase, -#endif oldInstallBase, newInstallBase); delete[] fileName; } +#endif patchQMakeSpec(newInstallBase); } From b3c2622fcf2923793a871e79f245b349196b215a Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Feb 2009 15:09:23 +0100 Subject: [PATCH 10/16] Fixes: potential speed improvement RevBy: dt Details: create QDir objects ony when needed --- src/shared/proparser/profileevaluator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index 790edab4571..c67f976e59c 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -1841,7 +1841,8 @@ bool ProFileEvaluator::Private::evaluateConditionalFunction(const QString &funct dirstr = file.left(slsh+1); file = file.right(file.length() - slsh - 1); } - cond = QDir(dirstr).entryList(QStringList(file)).count(); + if (file.contains('*') || file.contains('?')) + cond = QDir(dirstr).entryList(QStringList(file)).count(); break; } From 31d8e41ca05733a5dafe7ce5f2ee854cd5be4082 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Feb 2009 15:41:03 +0100 Subject: [PATCH 11/16] Fixes: update "known issues" section RevBy: k. --- doc/qtcreator.qdoc | 68 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index 6713d82e6d8..e500219afe8 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -1412,50 +1412,50 @@ The development team is aware of those, there is no need to report them as bug. \list - \o The central editor sometimes loses it "changed" status marker. + \o Paths or file names containing spaces or special characters, e.g., + colons, dollar signs, hash marks etc. may cause difficulties. This + is because some of the tools Qt Creator uses in the background have + restrictions on the characters allowed in file and directory names. + To be on the safe side, we recomment creating projects and project + items with names consisting of plain characters, numbers, + underscores, and hyphens. - \o There is a kernel bug essentially making debugging unreliable on - 2.6.24 kernels for i386 (which is, unfortunately, the default on - Ubuntu 8.04). See - \l{https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/230315/} for - details. The only solution to this problem is to boot another - kernel. - - \o Gdb may take long to load debugging symbols, especially from large - libraries like \c libQtWebKit. Starting the debugging module can - take up to several minutes without visible progress. + \o \c{.pro} files are reformatted if files have been added or removed. + Whitespace is not preserved. - \o Paths or file names containing spaces or special characters, e.g., - colons, dollar signs, hash marks etc. may cause difficulties. This - is because some of the tools Qt Creator uses in the background have - restrictions on the characters allowed in file and directory names. - To be on the safe side, we recomment creating projects and project - items with names consisting of plain characters, numbers, - underscores, and hyphens. + \o There is no IDE support for adding files to include (\c .pri) files. - \o \c{.pro} files are reformatted if files have been added or removed. - Whitespace is not preserved. + \o There is no IDE support for adding/removing sub-projects. Project + hierarchies (SUBDIRS template) have to be created manually. - \o There is no IDE support for adding files to include (\c .pri) files. + \o The file system sidebar does not update automatically. As a + workaround, switch to another directory and then back. - \o There is no IDE support for adding/removing sub-projects. Project - hierarchies (SUBDIRS template) have to be created manually. - - \o The file system sidebar does not update automatically. As a - workaround, switch to another directory and then back. - - \o Loading KDE4 designer plugins breaks the style, due to a bug in KDE. + \o Loading KDE4 designer plugins breaks the style in KDE < 4.2.1 + due to a bug in KDE. \o Scopes in .pro files are ignored, and environment variables not expanded. - \o Code completion for generated UI header files is not updated properly - after the first time. + \o Code completion for generated UI header files is updated only + after a build. - \o Code completion does not support typedefs (e.g. std::string) and - private classes (e.g. class MyClass::Data {};). + \o Code completion does not support typedefs for nested classes. + + \o There is a kernel bug essentially making debugging unreliable on + 2.6.24 kernels for i386 (which is, unfortunately, the default on + Ubuntu 8.04). See + \l{https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/230315/} for + details. The only solution to this problem is to boot another + kernel. + + \o Gdb may take long to load debugging symbols, especially from large + libraries like \c libQtWebKit. Starting the debugging module can + take up to several minutes without visible progress. + + \o Setting breakpoints in files that do not have unique absolute + paths may fail. For example, remounting parts of a file system + using the --bind mount option. - \o On Gnome, after minimizing Qt Creator and restoring again, the - application window does not repaint properly until resized. \endlist */ From 58eef7aa4b8acd8a527ca87170a039a086d5dffb Mon Sep 17 00:00:00 2001 From: Kavindra Palaraja Date: Tue, 3 Feb 2009 16:38:15 +0100 Subject: [PATCH 12/16] Fixes: Doc - updated 0.9.1 Beta to 0.9.2 Release Candidate RevBy: Eike Ziller --- doc/qtcreator.qdoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index e500219afe8..f9e55ba866d 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -5,13 +5,13 @@ \title Qt Creator Manual - \section1 Version 0.9.1 (Beta) + \section1 Version 0.9.2 (Release Candidate) The goal of Qt Creator is to provide a cross-platform, complete Integrated Development Environment (IDE) to develop Qt projects. It is available for the Linux, Mac OS X and Windows platforms. - \note The current version of Qt Creator is 0.9.2 (Beta). It is + \note The current version of Qt Creator is 0.9.2 (Release Candidate). It is possible to edit source code, compile, run and debug applications; other features are still under development. Please send bug reports and suggestions to qt-creator@trolltech.com. To subscribe, send a @@ -59,7 +59,7 @@ \o \l{Tips and Tricks} \o \l{Keyboard Shortcuts} \o \l{Glossary} - \o \l{Known Issues of Version 0.9.1 (Beta)} + \o \l{Known Issues of Version 0.9.2 (Release Candidate)} \endlist */ @@ -1406,9 +1406,9 @@ \previouspage creator-keyboard-shortcuts.html \page creator-known-issues.html - \title Known Issues of Version 0.9.1 (Beta) + \title Known Issues of Version 0.9.2 (Release Candidate) - There are some known issues with Qt Creator 0.9.1 (Beta). + There are some known issues with Qt Creator 0.9.2 (Release Candidate). The development team is aware of those, there is no need to report them as bug. \list From 4242ce7cb0890f95da343b70f8a4255045e74d1e Mon Sep 17 00:00:00 2001 From: con Date: Tue, 3 Feb 2009 19:46:22 +0100 Subject: [PATCH 13/16] Fixes: - Crash with "Go to slot" from form editor --- src/plugins/designer/workbenchintegration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/designer/workbenchintegration.cpp b/src/plugins/designer/workbenchintegration.cpp index 6f699b83817..bb657999ca4 100644 --- a/src/plugins/designer/workbenchintegration.cpp +++ b/src/plugins/designer/workbenchintegration.cpp @@ -564,7 +564,7 @@ bool WorkbenchIntegration::navigateToSlot(const QString &objectName, // Find the class definition in the file itself or in the directly // included files (order 1). QString namespaceName; - const Class *cl; + const Class *cl = 0; Document::Ptr doc; foreach (const Document::Ptr &d, docList) { From 5433c8534e529da4720d70e356b2bd191c3d9756 Mon Sep 17 00:00:00 2001 From: con Date: Tue, 3 Feb 2009 19:47:06 +0100 Subject: [PATCH 14/16] Fixes: - Crash when opening form editor RevBy: - done with dt Details: - There was an addition setCurrentEditor signal with the old editor sent while opening the new editor, coming from adding the new entry into the model for the editor combo box. --- src/plugins/coreplugin/editormanager/stackededitorgroup.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/editormanager/stackededitorgroup.cpp b/src/plugins/coreplugin/editormanager/stackededitorgroup.cpp index 08e63b2773e..cc759c6c7ff 100644 --- a/src/plugins/coreplugin/editormanager/stackededitorgroup.cpp +++ b/src/plugins/coreplugin/editormanager/stackededitorgroup.cpp @@ -217,7 +217,6 @@ void StackedEditorGroup::addEditor(IEditor *editor) void StackedEditorGroup::insertEditor(int index, IEditor *editor) { - EditorGroup::insertEditor(index, editor); if (m_container->indexOf(editor->widget()) != -1) return; @@ -231,6 +230,9 @@ void StackedEditorGroup::insertEditor(int index, IEditor *editor) } connect(editor, SIGNAL(changed()), this, SLOT(checkEditorStatus())); + bool block = m_editorList->blockSignals(true); + EditorGroup::insertEditor(index, editor); + m_editorList->blockSignals(block); emit editorAdded(editor); } From 180233e7af6f5abebcba2b37def3c7e5c5766793 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Wed, 4 Feb 2009 10:57:32 +0100 Subject: [PATCH 15/16] Fixes: Do not activate member completion when class names are used as base of a DOT or ARROW expression. --- src/plugins/cpptools/cppcodecompletion.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index 1f5bb7e1f4e..bca1d576e9f 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -599,7 +599,9 @@ bool CppCodeCompletion::completeMember(const QList &re ty = refTy->elementType(); if (Class *classTy = ty->asClass()) { - classObjectCandidates.append(classTy); + Symbol *symbol = result.second; + if (symbol && ! symbol->isClass()) + classObjectCandidates.append(classTy); } else if (NamedType *namedTy = ty->asNamedType()) { // ### This code is pretty slow. const QList candidates = context.resolve(namedTy->name()); @@ -700,7 +702,9 @@ bool CppCodeCompletion::completeMember(const QList &re namedTy = ptrTy->elementType()->asNamedType(); } } else if (Class *classTy = ty->asClass()) { - classObjectCandidates.append(classTy); + Symbol *symbol = result.second; + if (symbol && ! symbol->isClass()) + classObjectCandidates.append(classTy); } else { namedTy = ty->asNamedType(); if (! namedTy) { From e5c845fcc7d84e4cc042fd3f0f1be883e2b4bcb0 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 4 Feb 2009 12:46:38 +0100 Subject: [PATCH 16/16] Fixes: Toolbar cosmetic problem RevBy: b_lindeijer Details: This resolves the problem with missing top-borders on the find toolbar. --- 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();