diff --git a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp index 6797a50888ee80aa96e173a41adad1273914a5fe..33d83f67efbd68ee25fa8ccbedce858b995fba22 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 b21db43fa356cbf49a50ebca568c909bb21ad18e..f2b51c1204ca568dff7680c832e3868a4275e203 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 aff4d0c8809bc130d52e906ce89652e1c9551b31..f31edf2cfb46f462642870c3cde82a7a7de6371d 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(); diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index df68e5778dceff90d5c6c79b1584ddb66f060ad9..1f5bb7e1f4efa7f48be94c0a24f0091912827da8 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -598,7 +598,9 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &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<Symbol *> candidates = context.resolve(namedTy->name()); foreach (Symbol *candidate, candidates) { @@ -689,12 +691,16 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &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 if (Class *classTy = ty->asClass()) { + classObjectCandidates.append(classTy); } else { namedTy = ty->asNamedType(); if (! namedTy) { diff --git a/src/plugins/designer/formeditorplugin.cpp b/src/plugins/designer/formeditorplugin.cpp index 823efb590d19d1be3a1ad12f6cf58247aad510e5..862b29cb46e976583b6e5605964bc1baf30425ce 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; diff --git a/src/plugins/find/searchresulttreeview.cpp b/src/plugins/find/searchresulttreeview.cpp index 3b51d9e0c1df5eb9fe58fd0748f7ed46a44a31ab..6887fa9bf80469114e107bced4090d95bbb679dc 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(); diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 88f7b53e5599203c877ad8759c06f2b640bc2d94..a8e14e986893b9e035e60483a0bfa2bfc135bb42 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); } diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.h b/src/plugins/qt4projectmanager/qt4runconfiguration.h index ce1d44769e0a13f081ae49c5b8a3af1382f9e8ab..0913fc0861c386d1fe78f60e04e0b8f42d1bf987 100644 --- a/src/plugins/qt4projectmanager/qt4runconfiguration.h +++ b/src/plugins/qt4projectmanager/qt4runconfiguration.h @@ -38,9 +38,11 @@ #include <QtCore/QStringList> #include <QtGui/QWidget> +QT_BEGIN_NAMESPACE class QWidget; class QLabel; class QLineEdit; +QT_END_NAMESPACE namespace Qt4ProjectManager { diff --git a/src/shared/qrceditor/resourceview.cpp b/src/shared/qrceditor/resourceview.cpp index cb010f0f4b9138e0d597c3a697d0e896e9aca188..94df537f2ce89385a13cad55d18241442b146b44 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()