From 9049b6bb1151656cfa08dd644995c7c6b21f7141 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 31 Mar 2009 15:40:35 +0200 Subject: [PATCH 1/4] Fix "Go to slot" in case ui is in namespace Task: 249918 --- 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 7cf505b4e29..8768e470924 100644 --- a/src/plugins/designer/workbenchintegration.cpp +++ b/src/plugins/designer/workbenchintegration.cpp @@ -541,7 +541,7 @@ void WorkbenchIntegration::slotNavigateToSlot(const QString &objectName, const Q static inline QString uiClassName(QString formObjectName) { const int indexOfScope = formObjectName.lastIndexOf(QLatin1String("::")); - const int uiNameSpaceInsertionPos = indexOfScope >= 0 ? indexOfScope : 0; + const int uiNameSpaceInsertionPos = indexOfScope >= 0 ? indexOfScope + 2 : 0; formObjectName.insert(uiNameSpaceInsertionPos, QLatin1String("Ui::")); return formObjectName; } From e7d2c4dd3538dba1bef579418a0a4d9d3f2db985 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 31 Mar 2009 14:52:08 +0200 Subject: [PATCH 2/4] fakevim: make standalone version compile after the settings changes --- tests/manual/fakevim/fakevim.pro | 16 +++++++++++++--- tests/manual/fakevim/main.cpp | 4 +++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/manual/fakevim/fakevim.pro b/tests/manual/fakevim/fakevim.pro index 8624a100b37..141cf20d5ec 100644 --- a/tests/manual/fakevim/fakevim.pro +++ b/tests/manual/fakevim/fakevim.pro @@ -1,11 +1,21 @@ FAKEVIMHOME = ../../../src/plugins/fakevim +UTILSDIR = ../../../src/libs SOURCES += \ main.cpp \ - $$FAKEVIMHOME/fakevimhandler.cpp + $$FAKEVIMHOME/fakevimhandler.cpp \ + $$FAKEVIMHOME/fakevimactions.cpp \ + $$UTILSDIR/utils/savedaction.cpp \ + $$UTILSDIR/utils/pathchooser.cpp \ + $$UTILSDIR/utils/basevalidatinglineedit.cpp \ HEADERS += \ - $$FAKEVIMHOME/fakevimhandler.h + $$FAKEVIMHOME/fakevimhandler.h \ + $$FAKEVIMHOME/fakevimactions.h \ + $$UTILSDIR/utils/savedaction.h \ + $$UTILSDIR/utils/pathchooser.h \ + $$UTILSDIR/utils/basevalidatinglineedit.h \ + +INCLUDEPATH += $$FAKEVIMHOME $$UTILSDIR -INCLUDEPATH += $$FAKEVIMHOME diff --git a/tests/manual/fakevim/main.cpp b/tests/manual/fakevim/main.cpp index a78453528a2..1d31d998403 100644 --- a/tests/manual/fakevim/main.cpp +++ b/tests/manual/fakevim/main.cpp @@ -108,7 +108,7 @@ int main(int argc, char *argv[]) QObject::connect(&handler, SIGNAL(commandBufferChanged(QString)), &proxy, SLOT(changeStatusMessage(QString))); - QObject::connect(&handler, SIGNAL(quitRequested()), + QObject::connect(&handler, SIGNAL(quitRequested(bool)), &app, SLOT(quit())); QObject::connect(&handler, SIGNAL(selectionChanged(QList)), @@ -118,6 +118,8 @@ int main(int argc, char *argv[]) QObject::connect(&handler, SIGNAL(statusDataChanged(QString)), &proxy, SLOT(changeStatusData(QString))); + theFakeVimSetting(ConfigUseFakeVim)->setValue(true); + handler.installEventFilter(); handler.setupWidget(); if (args.size() >= 1) handler.handleCommand("r " + args.at(0)); From a01c9c961b6cd666e8739aa916294c0b9da1615f Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 31 Mar 2009 15:43:39 +0200 Subject: [PATCH 3/4] cpptool: sort entry that start with a given string towards the top of the quickopenfilter Reviewed-by: Roberto Raggi --- src/plugins/cpptools/cppquickopenfilter.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/plugins/cpptools/cppquickopenfilter.cpp b/src/plugins/cpptools/cppquickopenfilter.cpp index 8c11a8b3585..a0f74cbbd08 100644 --- a/src/plugins/cpptools/cppquickopenfilter.cpp +++ b/src/plugins/cpptools/cppquickopenfilter.cpp @@ -80,11 +80,12 @@ static bool compareLexigraphically(const QuickOpen::FilterEntry &a, QList CppQuickOpenFilter::matchesFor(const QString &origEntry) { QString entry = trimWildcards(origEntry); - QList entries; + QList goodEntries; + QList betterEntries; QStringMatcher matcher(entry, Qt::CaseInsensitive); const QRegExp regexp("*"+entry+"*", Qt::CaseInsensitive, QRegExp::Wildcard); if (!regexp.isValid()) - return entries; + return goodEntries; bool hasWildcard = (entry.contains('*') || entry.contains('?')); QMutableMapIterator it(m_searchList); @@ -106,15 +107,21 @@ QList CppQuickOpenFilter::matchesFor(const QString &orig QVariant id = qVariantFromValue(info); QuickOpen::FilterEntry filterEntry(this, info.symbolName, id, info.icon); filterEntry.extraInfo = info.symbolType; - entries.append(filterEntry); + if (info.symbolName.startsWith(entry)) + betterEntries.append(filterEntry); + else + goodEntries.append(filterEntry); } } } - if (entries.size() < 1000) - qSort(entries.begin(), entries.end(), compareLexigraphically); + if (goodEntries.size() < 1000) + qSort(goodEntries.begin(), goodEntries.end(), compareLexigraphically); + if (betterEntries.size() < 1000) + qSort(betterEntries.begin(), betterEntries.end(), compareLexigraphically); - return entries; + betterEntries += goodEntries; + return betterEntries; } void CppQuickOpenFilter::accept(QuickOpen::FilterEntry selection) const From eb9a7d637fd628bfcad354fe367ebca859215559 Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Tue, 31 Mar 2009 17:48:14 +0200 Subject: [PATCH 4/4] Fixes: Doc - reviewing documentation for CMake --- doc/qtcreator.qdoc | 122 ++++++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 56 deletions(-) diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index 029267ff695..12086045ec2 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -1110,7 +1110,7 @@ \table \row - \i \bold{Note:} + \i \bold{Note:} \i Gdb, and therefore Qt Creator's debugger works for optimized builds on Linux and Mac OS X. However, optimization may lead @@ -1120,7 +1120,7 @@ \i The debug information provided by gcc does not include enough information about the time when a variable is initialized. - Qt Creator therefore can not tell whether the contents of a + Therefore, Qt Creator can not tell whether the contents of a local variable contains "real data", or "initial noise". If a QObject appears uninitialized, its value will be reported as "out of scope". However, not all uninitialized objects can be @@ -1184,7 +1184,7 @@ \table \row - \i \inlineimage qtcreator-setting-breakpoint1.png + \i \inlineimage qtcreator-setting-breakpoint1.png \i \bold{Setting a Breakpoint} First, we set a breakpoint on the line where we invoke @@ -1247,6 +1247,68 @@ */ +/*! + + \contentspage index.html + \previouspage creator-debugging.html + \page creator-cmake-overview.html + \nextpage creator-tips.html + + \title CMake Support + + Since Qt Creator 1.1, support for CMake project files is available. + + \section1 Opening CMake Projects + + To open a CMake project select \gui Open from the \gui File menu and select + the \c{CMakeLists.txt} file from your CMake project. A wizard will guide + you with the rest of the process. If the CMake project does not have an + in-place build, Qt Creator lets you specify the directory in which the + project is built (shadow build). + + The screenshot below shows how you can specify command line arguments to + CMake for your project. + + ###TODO one, two pictures ? \image qtcreator-import-wizard.png + + Normally, there is no need to pass any command line arguments for projects + that are already built, as CMake caches that information. + + + \section1 Building CMake Projects + + Qt Creator builds CMake Projects by running \c make or \c mingw32-make, + depending on your platform. The build errors and warnings are parsed and + displayed in the \gui{Build Issues} output pane. + + By default Qt Creator builds the "all" target. You can change which + targets get build in the Project/Build Settings. + + ### \image qtcreator-build-settings.png + + Currently only one build configuration is supported and the + build directory can't be changed after the initial import. This + limitation will be fixed for the next version. + + \section1 Running CMake Projects + Qt Creator automatically adds Run Configurations for all the + targets specified in the CMake project file. + + + \section1 Know Issues + \list + \o No syntax highlighting for CMake project files. + \o Project files which are included from CMakeLists.txt aren't + shown in the navigation tree. + \o Using the visual studio compiler with CMake is not yet + supported. + \o Qt Creator doesn't support creating new CMake projects. + \o More than one build directory is not supported. + \o Changing the build directory after the initial import + is currently disabled. +*/ + + /*! \contentspage index.html \previouspage creator-debugging.html @@ -1532,6 +1594,7 @@ \endlist */ + /*! \contentspage index.html \previouspage creator-known-issues.html @@ -1551,56 +1614,3 @@ \endlist */ -/*! - \contentspage index.html - \page creator-cmake-overview.html - - \title CMake Support - - With version 1.1 Qt Creator now also supports CMake project files. - - \note The CMake project support is neither complete nor bug free. - - \section1 Opening CMake projects - To open a CMake project use File/Open and select the toplevel - CMakeLists.txt file from your CMake project. Qt Creator will - guide you with a wizard through the open step. If the CMake project - does not have a in source build Qt Creator let's you specify the - directory in which the project is build. If you need to pass command - line arguments to CMake for your project, you can also do that. - For already build projects, you normally don't need to pass any - command line arguments, since CMake caches that information. - - ###TODO one, two pictures ? \image qtcreator-import-wizard.png - - \section1 Building CMake Projects - Qt Creator builds CMake Projects by running make or mingw32-make, - depending on your platform. The build errors and warnings are parsed - and displayed in the Build Issues output pane. - - By default Qt Creator builds the "all" target. You can change which - targets get build in the Project/Build Settings. - - ### \image qtcreator-build-settings.png - - Currently only one build configuration is supported and the - build directory can't be changed after the initial import. This - limitation will be fixed for the next version. - - \section1 Running CMake Projects - Qt Creator automatically adds Run Configurations for all the - targets specified in the CMake project file. - - - \section1 Know Issues - \list - \o No syntax highlighting for CMake project files. - \o Project files which are included from CMakeLists.txt aren't - shown in the navigation tree. - \o Using the visual studio compiler with CMake is not yet - supported. - \o Qt Creator doesn't support creating new CMake projects. - \o More than one build directory is not supported. - \o Changing the build directory after the initial import - is currently disabled. -*/