Merge branch '1.2' of git@scm.dev.nokia.troll.no:creator/mainline

This commit is contained in:
Roberto Raggi
2009-06-10 13:11:40 +02:00
12 changed files with 36 additions and 40 deletions

View File

@@ -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.

View File

@@ -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/>

View File

@@ -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

View File

@@ -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(), /**/);
}

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 580 B

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -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);

View File

@@ -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);
}
}

View File

@@ -10,4 +10,3 @@ SOURCES += ../app.cpp
# SOURCES += ../../../../../share/qtcreator/gdbmacros/gdbmacros.cpp
QT += network
message("this says <foo & bar>")
FORMS += ../form.ui