diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc index 24e1804eaa7c67fcef5bf8cf75a3c2e71ef60c52..cfb72d4ea1ba6e440f231e05e44cd83e62a66225 100644 --- a/doc/addressbook-sdk.qdoc +++ b/doc/addressbook-sdk.qdoc @@ -733,7 +733,7 @@ We begin by adding a new \c{.ui} file to our project. Right click on your project and select \gui{Add New...}. In the \gui{New File} dialog, select - \gui{Qt Designer Form}. In the \gui{Qt Designer Form| dialog, select + \gui{Qt Designer Form}. In the \gui{Qt Designer Form} dialog, select \e{Dialog without buttons}. Name it \c{finddialog.ui} and add it to your project. The \QD plugin within Qt Creator will now display your new form. diff --git a/doc/examples/addressbook-sdk/part5/finddialog.ui b/doc/examples/addressbook-sdk/part5/finddialog.ui index e4e6b3ffcdc23f03b530f88b5a163c1b4cc4bf8d..500b70b7c36589c40cab832f47471c55c48589c0 100644 --- a/doc/examples/addressbook-sdk/part5/finddialog.ui +++ b/doc/examples/addressbook-sdk/part5/finddialog.ui @@ -1,41 +1,17 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>Dialog</class> - <widget class="QDialog" name="Dialog"> - <property name="geometry"> +<ui version="4.0" > + <class>FindDialog</class> + <widget class="QDialog" name="FindDialog" > + <property name="geometry" > <rect> <x>0</x> <y>0</y> - <width>476</width> - <height>87</height> + <width>400</width> + <height>300</height> </rect> </property> - <property name="windowTitle"> + <property name="windowTitle" > <string>Dialog</string> </property> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QLabel" name="label"> - <property name="text"> - <string>Enter the name of a contact:</string> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="lineEdit"/> - </item> - <item> - <widget class="QPushButton" name="findButton"> - <property name="text"> - <string>Find</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> </widget> <resources/> <connections/> diff --git a/doc/examples/addressbook-sdk/part5/part5.pro b/doc/examples/addressbook-sdk/part5/part5.pro index e4b89545a69c20f7bd96e1e6048f6dda8c4679e1..f41e5e85f19c57a1000fba7c147e718c8e603067 100644 --- a/doc/examples/addressbook-sdk/part5/part5.pro +++ b/doc/examples/addressbook-sdk/part5/part5.pro @@ -4,7 +4,9 @@ TARGET = part5 TEMPLATE = app SOURCES += main.cpp \ - addressbook.cpp -HEADERS += addressbook.h + addressbook.cpp \ + finddialog.cpp +HEADERS += addressbook.h \ + finddialog.h FORMS += addressbook.ui \ finddialog.ui diff --git a/src/plugins/coreplugin/mimedatabase.cpp b/src/plugins/coreplugin/mimedatabase.cpp index 1a5f457ecb5a7020ad58bf8a71d345c87696cc8c..85dd2b64a25d433651dbce4423cca40ba1ed3052 100644 --- a/src/plugins/coreplugin/mimedatabase.cpp +++ b/src/plugins/coreplugin/mimedatabase.cpp @@ -573,7 +573,7 @@ private: BaseMimeTypeParser:: BaseMimeTypeParser() : // RE to match a suffix glob pattern: "*.ext" (and not sth like "Makefile" or // "*.log[1-9]" - m_suffixPattern(QLatin1String("^\\*\\.[\\w]+$")) + m_suffixPattern(QLatin1String("^\\*\\.[\\w+]+$")) { QTC_ASSERT(m_suffixPattern.isValid(), /**/); } diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index f37dd9b442d3338d00a35023a5273911e4119269..888bf09cc5838d222253d63c0bc0e81ccc1d0246 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -312,8 +312,11 @@ int BreakHandler::findBreakpoint(const QString &fileName, int lineNumber) int BreakHandler::findBreakpoint(int bpNumber) { + if (!size()) + return -1; + QString numStr = QString::number(bpNumber); for (int index = 0; index != size(); ++index) - if (at(index)->bpNumber == QString::number(bpNumber)) + if (at(index)->bpNumber == numStr) return index; return -1; } diff --git a/src/plugins/debugger/breakhandler.h b/src/plugins/debugger/breakhandler.h index 0f2cef63b26144fad5b172503a11d17f339f58fa..2ecc314d23daa04e8fc2e135b93102aad637504d 100644 --- a/src/plugins/debugger/breakhandler.h +++ b/src/plugins/debugger/breakhandler.h @@ -89,6 +89,7 @@ public: QString bpFuncName; // function name acknowledged by the debugger engine QString bpAddress; // address acknowledged by the debugger engine bool bpMultiple; // happens in constructors/gdb + bool bpEnabled; // enable/disable command sent // taken from either user input or gdb responses QString markerFileName; // used to locate the marker diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index b84f891c1e9d94e4af94d8299abd1ff0deed750f..aa4820bc2194c341c1f025901ad2985e4d955bc5 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1799,6 +1799,7 @@ void GdbEngine::breakpointDataFromOutput(BreakpointData *data, const GdbMi &bkpt return; data->pending = false; data->bpMultiple = false; + data->bpEnabled = true; data->bpCondition.clear(); QStringList files; foreach (const GdbMi &child, bkpt.children()) { @@ -1830,6 +1831,8 @@ void GdbEngine::breakpointDataFromOutput(BreakpointData *data, const GdbMi &bkpt // gdb 6.3 likes to "rewrite" conditions. Just accept that fact. if (data->bpCondition != data->condition && data->conditionsMatch()) data->condition = data->bpCondition; + } else if (child.hasName("enabled")) { + data->bpEnabled = (child.data() == "y"); } else if (child.hasName("pending")) { data->pending = true; @@ -2146,14 +2149,18 @@ void GdbEngine::attemptBreakpointSynchronization() foreach (BreakpointData *data, handler->takeDisabledBreakpoints()) { QString bpNumber = data->bpNumber; - if (!bpNumber.trimmed().isEmpty()) + if (!bpNumber.trimmed().isEmpty()) { postCommand(_("-break-disable ") + bpNumber, NeedsStop); + data->bpEnabled = false; + } } foreach (BreakpointData *data, handler->takeEnabledBreakpoints()) { QString bpNumber = data->bpNumber; - if (!bpNumber.trimmed().isEmpty()) + if (!bpNumber.trimmed().isEmpty()) { postCommand(_("-break-enable ") + bpNumber, NeedsStop); + data->bpEnabled = true; + } } foreach (BreakpointData *data, handler->takeRemovedBreakpoints()) { @@ -2210,6 +2217,12 @@ void GdbEngine::attemptBreakpointSynchronization() updateNeeded = true; break; } + if (data->bpNumber.toInt() && !data->enabled && data->bpEnabled) { + postCommand(_("-break-disable ") + data->bpNumber, NeedsStop); + data->bpEnabled = false; + updateNeeded = true; + break; + } } } diff --git a/src/plugins/projectexplorer/images/compile_error.png b/src/plugins/projectexplorer/images/compile_error.png index 162072e58d8141f18ae716606a7fcf650773b9a1..51a2779fcead2cca0a84d4af77bf0ab290c51e97 100644 Binary files a/src/plugins/projectexplorer/images/compile_error.png and b/src/plugins/projectexplorer/images/compile_error.png differ diff --git a/src/plugins/projectexplorer/images/debugger_start.png b/src/plugins/projectexplorer/images/debugger_start.png index 36e5fc4780474e115f8e982bdcfadd964e28a3fe..f42d2e077c50a9e7dbda0ce78f812ba814915257 100644 Binary files a/src/plugins/projectexplorer/images/debugger_start.png and b/src/plugins/projectexplorer/images/debugger_start.png differ diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index d38a98b8a5da46b3c49ad10ccec3457a25d88b84..9c2dfacb493fffacacff953c72124bfc21302528 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -597,7 +597,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er // debug action QIcon debuggerIcon(":/projectexplorer/images/debugger_start_small.png"); - debuggerIcon.addFile(":/gdbdebugger/images/debugger_start.png"); + debuggerIcon.addFile(":/projectexplorer/images/debugger_start.png"); m_debugAction = new QAction(debuggerIcon, tr("Start Debugging"), this); cmd = am->registerAction(m_debugAction, Constants::DEBUG, globalcontext); cmd->setAttribute(Core::Command::CA_UpdateText); diff --git a/src/plugins/qt4projectmanager/qtoptionspage.cpp b/src/plugins/qt4projectmanager/qtoptionspage.cpp index b85607e3ea61c278c7e8a0f6c270772c3cbb0eca..2e34a2a83d36b0420e048a02d0d2d6a1edfb2652 100644 --- a/src/plugins/qt4projectmanager/qtoptionspage.cpp +++ b/src/plugins/qt4projectmanager/qtoptionspage.cpp @@ -443,9 +443,11 @@ void QtOptionsPageWidget::updateCurrentQtPath() m_ui->debuggingHelperStateLabel->setPixmap(QPixmap(":/extensionsystem/images/error.png")); } m_ui->showLogButton->setEnabled(hasLog); + m_ui->rebuildButton->setEnabled(true); } else { currentItem->setData(2, Qt::DecorationRole, QIcon()); m_ui->debuggingHelperStateLabel->setPixmap(QPixmap()); + m_ui->rebuildButton->setEnabled(true); } } diff --git a/tests/manual/gdbdebugger/simple/app/app.pro b/tests/manual/gdbdebugger/simple/app/app.pro index bfeedd0bc5e9e5cd5494a772792e7037d9f68bcc..e991a3dba4ecdd8835358357ddf52b9ad66b21a9 100644 --- a/tests/manual/gdbdebugger/simple/app/app.pro +++ b/tests/manual/gdbdebugger/simple/app/app.pro @@ -10,4 +10,3 @@ SOURCES += ../app.cpp # SOURCES += ../../../../../share/qtcreator/gdbmacros/gdbmacros.cpp QT += network message("this says <foo & bar>") -FORMS += ../form.ui