From 565b73b5a544014487807683c1db34b78ae43ed5 Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Tue, 2 Jun 2009 15:19:21 +0200 Subject: [PATCH 01/25] Fixes: Doc - more of the tutorial - explaining why we need a main layout for the top-level widget. RevBy: Daniel Molkentin --- doc/addressbook-sdk.qdoc | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc index eed7f573f32..bff44eedded 100644 --- a/doc/addressbook-sdk.qdoc +++ b/doc/addressbook-sdk.qdoc @@ -136,6 +136,7 @@ Now that we have all the files we need, let's move on to designing the user interface. + \section1 Placing Widgets on the Form In the \gui{Project Sidebar}, double-click on the \c{addressbook.ui} file. @@ -153,14 +154,21 @@ earlier. We use a QGridLayout to position our labels and input fields in a structured manner. QGridLayout divides the available space into a grid and places widgets in the cells we specify with row and column numbers. The - diagram below shows the layout cells and the position of our widgets. + diagram below shows the layout cells and the position of our widgets. Place + your widgets accordingly and save the form by choosing + \gui{File | Save} or using the \key{Ctrl+S} shortcut. \image addressbook-tutorial-part1-labeled-screenshot.png - Place your widgets accordingly and save the form by choosing - \gui{File | Save} or using the \key{Ctrl+S} shortcut. - - A common + A common mistake when designing user interfaces with \QD is overlooking the + top level widget's layout. Unlike sub-layouts, which \QD displays with a + red border, top level layouts have no graphical representation. Layouts are + necessary for top level widgets, in this case QWidget, to ensure that when + the window is resized, the widgets on the form will resize accordingly. You + can try this out by pressing \key{Ctrl+R} now. To correct it, simply click + anywhere on the form and select \gui{Lay out Horizontally} or + \gui{Lay out Vertically}. The output will be the same. Now your widgets + will resize correctly. \section1 The AddressBook Class @@ -280,7 +288,9 @@ ## image Select all the objects on the form (use \key{Ctrl+A}) and lay them out in a - grid. + grid. Lastly, set the top level widget's layout by right-clicking anywhere + on the widget and selecting \gui{Lay out Horizontally} or + \gui{Lay out Vertically}. From de8dcb7b23b83c650a7aef78dfef62e980883e9e Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Tue, 2 Jun 2009 15:21:20 +0200 Subject: [PATCH 02/25] Fixes: Doc - remove trailing whitespace Reviewed-By: TrustMe --- doc/addressbook-sdk.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc index bff44eedded..c60ad27ee06 100644 --- a/doc/addressbook-sdk.qdoc +++ b/doc/addressbook-sdk.qdoc @@ -136,7 +136,7 @@ Now that we have all the files we need, let's move on to designing the user interface. - + \section1 Placing Widgets on the Form In the \gui{Project Sidebar}, double-click on the \c{addressbook.ui} file. From 0b90329427742da68d33a403afc62d40932f4702 Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Tue, 2 Jun 2009 17:42:27 +0200 Subject: [PATCH 03/25] Fixes: Doc - more of the tutorial RevBy: TrustMe --- doc/addressbook-sdk.qdoc | 29 +++- .../addressbook-sdk/part2/addressbook.cpp | 23 ++- .../addressbook-sdk/part2/addressbook.h | 24 +++ .../addressbook-sdk/part2/addressbook.ui | 140 +++++++++--------- 4 files changed, 140 insertions(+), 76 deletions(-) diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc index c60ad27ee06..6aeff092a6d 100644 --- a/doc/addressbook-sdk.qdoc +++ b/doc/addressbook-sdk.qdoc @@ -269,7 +269,6 @@ \section1 Placing Widgets on the Form - Now that we have the labels and input fields set up, we add push buttons to complete the process of adding a contact. So, we begin by breaking the existing layouts. Then, we add three push buttons. Double-click on each of @@ -292,6 +291,34 @@ on the widget and selecting \gui{Lay out Horizontally} or \gui{Lay out Vertically}. + The final design of the form is shown in the screenshot below: + ## image + + + \section1 The AddressBook Class + + To ensure that the Address Book reacts to user interaction, we need to + write slots for each push button that we added earlier. A slot is a + function that responds to a particular signal. We will discuss this + concept in further detail below. However, for an overview of Qt's signals + and slots concept, you can refer to the \l{Signals and Slots} document. + + In the \l{examples/addressbook-sdk/part2/addressbook.h}{\c addressbook.h} + file, we add the following code: + + \snippet examples/addressbook-sdk/part2/addressbook.h slot definition + + Next, we have to provide private members for the \c AddressBook class so + that we can access these members freely throughout the application. + + \note The names, e.g., \c addButton etc., correspond to the name of the + actual object. You can modify them by double-clicking on their names within + \QD's \gui{Object Inspector}. + + We need a container to store our address book contacts, so that we can + traverse and display them. A QMap object, \c contacts, is used for this + purpose as it holds a key-value pair: the contact's name as the \e key, and + the contact's address as the \e value. */ diff --git a/doc/examples/addressbook-sdk/part2/addressbook.cpp b/doc/examples/addressbook-sdk/part2/addressbook.cpp index 38e9404f31a..353c65a70e0 100644 --- a/doc/examples/addressbook-sdk/part2/addressbook.cpp +++ b/doc/examples/addressbook-sdk/part2/addressbook.cpp @@ -1,4 +1,3 @@ -//! [class implementation] #include "addressbook.h" #include "ui_addressbook.h" @@ -6,10 +5,30 @@ AddressBook::AddressBook(QWidget *parent) : QWidget(parent), ui(new Ui::AddressBookClass) { ui->setupUi(this); + + addButton = new QPushButton(); + addButton = ui->addButton; + + submitButton = new QPushButton(); + submitButton = ui->submitButton; + + cancelButton = new QPushButton(); + cancelButton = ui->cancelButton; } AddressBook::~AddressBook() { delete ui; } -//! [class implementation] + +void AddressBook::addContact() +{ +} + +void AddressBook::submitContact() +{ +} + +void AddressBook::cancel() +{ +} diff --git a/doc/examples/addressbook-sdk/part2/addressbook.h b/doc/examples/addressbook-sdk/part2/addressbook.h index c5937d435b8..3021d5b9b09 100644 --- a/doc/examples/addressbook-sdk/part2/addressbook.h +++ b/doc/examples/addressbook-sdk/part2/addressbook.h @@ -3,6 +3,9 @@ #define ADDRESSBOOK_H #include +#include +#include +#include namespace Ui { @@ -17,8 +20,29 @@ public: AddressBook(QWidget *parent = 0); ~AddressBook(); +//! [slot definition] +public slots: + void addContact(); + void submitContact(); + void cancel(); +//! [slot definition] + private: Ui::AddressBookClass *ui; + +//! [members1] + QPushButton *addButton; + QPushButton *submitButton; + QPushButton *cancelButton; + QLineEdit *nameLine; + QTextEdit *addressText; +//! [members1] + +//! [members2] + QMap contacts; + QString oldName; + QString oldAddress; +//! [members2] }; #endif // ADDRESSBOOK_H diff --git a/doc/examples/addressbook-sdk/part2/addressbook.ui b/doc/examples/addressbook-sdk/part2/addressbook.ui index c3683933014..1e5bf5ed22c 100644 --- a/doc/examples/addressbook-sdk/part2/addressbook.ui +++ b/doc/examples/addressbook-sdk/part2/addressbook.ui @@ -13,79 +13,73 @@ AddressBook - - - - 10 - 10 - 413 - 225 - - - - - - - Name: - - - - - - - - - - Address: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - - - - Add - - - - - - - Submit - - - - - - - Cancel - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - + + + + + + + Name: + + + + + + + + + + Address: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + + + Add + + + + + + + Submit + + + + + + + Cancel + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + From c9a00bff362a976560bf6803498ed709444a0c33 Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Wed, 3 Jun 2009 10:50:04 +0200 Subject: [PATCH 04/25] Fixes: Doc - more of Part2, hoping to finish it today RevBy: TrustMe --- doc/addressbook-sdk.qdoc | 45 ++++++++++++++++--- .../addressbook-sdk/part2/addressbook.cpp | 29 ++++++++++-- .../addressbook-sdk/part2/addressbook.ui | 8 ++-- 3 files changed, 69 insertions(+), 13 deletions(-) diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc index 6aeff092a6d..74e5807901e 100644 --- a/doc/addressbook-sdk.qdoc +++ b/doc/addressbook-sdk.qdoc @@ -269,12 +269,13 @@ \section1 Placing Widgets on the Form - Now that we have the labels and input fields set up, we add push buttons to - complete the process of adding a contact. So, we begin by breaking the - existing layouts. Then, we add three push buttons. Double-click on each of - them to set their text to "Add", "Submit", and "Cancel". We now require a - vertical spacer to ensure that the push buttons will be laid out neatly; - drag one from the \gui{Widget Box}. + We shall continue with the form we had from the last chapter; we have the + labels and input fields set up, but we need to add push buttons to complete + the process of adding a contact. So, we begin by breaking the existing + layouts. Then, we add three push buttons. Double-click on each of them to + set their text to "Add", "Submit", and "Cancel". We now require a vertical + spacer to ensure that the push buttons will be laid out neatly; drag one + from the \gui{Widget Box}. Next, lay out these three push buttons and the spacer vertically, by selecting all three of them (using the \key{Ctrl + click}) and choosing @@ -312,6 +313,8 @@ Next, we have to provide private members for the \c AddressBook class so that we can access these members freely throughout the application. + \snippet examples/addressbook-sdk/part2/addressbook.h members1 + \note The names, e.g., \c addButton etc., correspond to the name of the actual object. You can modify them by double-clicking on their names within \QD's \gui{Object Inspector}. @@ -321,4 +324,34 @@ purpose as it holds a key-value pair: the contact's name as the \e key, and the contact's address as the \e value. + \snippet examples/addressbook-sdk/part2/addressbook.h members2 + + We also declare two private QString objects, \c oldName and \c oldAddress. + These objects are needed to hold the name and address of hte contact that + was last displayed, before the user clicked \gui Add. So, when the user + clicks \gui Cancel, we can revert to displaying the details of the last + contact. + + Let's move on to implementing the slots we defined earlier. Within the + constructor of \c AddressBook, we extract the widgets from the form using + the \c ui object by pointing our private members to them. + + \snippet examples/addressbook-sdk/part2/addressbook.cpp extract objects + + Then we set \c nameLine and \c addressText to read-only, so that we can + only display but not edit existing contact details. We also hide + \c submitButton and \c cancelButton as they will only be be displayed + when the user clicks \gui Add, and this is handled by the \c addContact() + function discussed below. + + \snippet examples/addressbook-sdk/part2/addressbook.cpp signal slot + + We connect the push buttons' \l{QAbstractButton::clicked()}{clicked()} + signal to their respective slots. The figure below illustrates this. + + #image + + \section2 The \c{addContact()} Function + + */ diff --git a/doc/examples/addressbook-sdk/part2/addressbook.cpp b/doc/examples/addressbook-sdk/part2/addressbook.cpp index 353c65a70e0..f4a5ea50ec4 100644 --- a/doc/examples/addressbook-sdk/part2/addressbook.cpp +++ b/doc/examples/addressbook-sdk/part2/addressbook.cpp @@ -6,14 +6,37 @@ AddressBook::AddressBook(QWidget *parent) { ui->setupUi(this); - addButton = new QPushButton(); + //! [extract objects] + nameLine = new QLineEdit; + nameLine = ui->nameLine; + nameLine->setReadOnly(true); + + addressText = new QTextEdit; + addressText = ui->addressText; + addressText->setReadOnly(true); + + addButton = new QPushButton; addButton = ui->addButton; - submitButton = new QPushButton(); + submitButton = new QPushButton; submitButton = ui->submitButton; + submitButton->hide(); - cancelButton = new QPushButton(); + cancelButton = new QPushButton; cancelButton = ui->cancelButton; + cancelButton->hide(); + //! [extract objects] + + //! [signal slot] + connect(addButton, SIGNAL(clicked()), this, + SLOT(addContact())); + connect(submitButton, SIGNAL(clicked()), this, + SLOT(submitContact())); + connect(cancelButton, SIGNAL(clicked()), this, + SLOT(cancel())); + //! [signal slot] + + setWindowTitle(tr("Simple Address Book")); } AddressBook::~AddressBook() diff --git a/doc/examples/addressbook-sdk/part2/addressbook.ui b/doc/examples/addressbook-sdk/part2/addressbook.ui index 1e5bf5ed22c..e36ec38b318 100644 --- a/doc/examples/addressbook-sdk/part2/addressbook.ui +++ b/doc/examples/addressbook-sdk/part2/addressbook.ui @@ -17,17 +17,17 @@ - + Name: - + - + Address: @@ -37,7 +37,7 @@ - + From e94cefc67c18850915cd999511442471d10d355f Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Wed, 3 Jun 2009 11:11:43 +0200 Subject: [PATCH 05/25] Fixes: Doc - more of the tutorial, part 2 RevBy: TrustMe --- doc/addressbook-sdk.qdoc | 14 ++++++++++++-- .../addressbook-sdk/part2/addressbook.cpp | 17 +++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc index 74e5807901e..3d97237e570 100644 --- a/doc/addressbook-sdk.qdoc +++ b/doc/addressbook-sdk.qdoc @@ -346,12 +346,22 @@ \snippet examples/addressbook-sdk/part2/addressbook.cpp signal slot - We connect the push buttons' \l{QAbstractButton::clicked()}{clicked()} - signal to their respective slots. The figure below illustrates this. + We connect the push buttons' \l{QAbstractButton::}{clicked()} signal to + their respective slots. The figure below illustrates this. #image + Finally, we set the window title to "Simple Address Book" using the + \l{QWidget::}{setWindowTitle()} function. + + \snippet examples/addressbook-sdk/part2/addressbook.cpp window title + \section2 The \c{addContact()} Function + In this function, we begin by storing the last displayed contact details + in \c oldName and \c oldAddress. Then we clear these input fields and turn + off the read-only mode. The focus is set on \c nameLine and we display + \c submitButton and \c cancelButton; but we disable \c addButton. + \snippet examples/addressbook-sdk/part2/addressbook.cpp addContact */ diff --git a/doc/examples/addressbook-sdk/part2/addressbook.cpp b/doc/examples/addressbook-sdk/part2/addressbook.cpp index f4a5ea50ec4..1406c3ca72b 100644 --- a/doc/examples/addressbook-sdk/part2/addressbook.cpp +++ b/doc/examples/addressbook-sdk/part2/addressbook.cpp @@ -36,7 +36,9 @@ AddressBook::AddressBook(QWidget *parent) SLOT(cancel())); //! [signal slot] + //! [window title] setWindowTitle(tr("Simple Address Book")); + //! [window title] } AddressBook::~AddressBook() @@ -44,9 +46,24 @@ AddressBook::~AddressBook() delete ui; } +//! [addContact] void AddressBook::addContact() { + oldName = nameLine->text(); + oldAddress = addressTExt->toPlainText(); + + nameLine->clear(); + addressText->clear(); + + nameLine->setReadOnly(false); + nameLine->setFocus(Qt::OtherFocusReason); + addressText->setReadOnly(false); + + addButton->setEnabled(false); + submitButton->show(); + cancelButton->show(); } +//! [addContact] void AddressBook::submitContact() { From 76f57c8678823bd1a39871733ddfcb18c3d3a1fe Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 2 Jun 2009 15:08:23 +0200 Subject: [PATCH 06/25] fakevim: fix behaviour of 'r' at end of line --- src/plugins/fakevim/fakevimhandler.cpp | 13 +++++++------ tests/auto/fakevim/main.cpp | 20 ++++++++++++++++++-- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index fb3c3b15c49..ceda3253347 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -957,19 +957,20 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified, .arg(QChar(m_semicolonType)) .arg(QChar(m_semicolonKey))); } else if (m_submode == ReplaceSubMode) { - if (count() < rightDist() && text.size() == 1 + if (count() <= (rightDist() + atEndOfLine()) && text.size() == 1 && (text.at(0).isPrint() || text.at(0).isSpace())) { + if (atEndOfLine()) + moveLeft(); setAnchor(); moveRight(count()); - removeSelectedText(); + QString rem = removeSelectedText(); m_tc.insertText(QString(count(), text.at(0))); m_moveType = MoveExclusive; - m_submode = NoSubMode; setDotCommand("%1r" + text, count()); - finishMovement(); - } else { - m_submode = NoSubMode; } + setTargetColumn(); + m_submode = NoSubMode; + finishMovement(); } else if (m_subsubmode == MarkSubSubMode) { m_marks[key] = m_tc.position(); m_subsubmode = NoSubSubMode; diff --git a/tests/auto/fakevim/main.cpp b/tests/auto/fakevim/main.cpp index 9e931526f92..66002c9380c 100644 --- a/tests/auto/fakevim/main.cpp +++ b/tests/auto/fakevim/main.cpp @@ -63,6 +63,7 @@ private slots: void command_e(); void command_i(); void command_left(); + void command_r(); void command_right(); void command_up(); void command_w(); @@ -325,12 +326,12 @@ void tst_FakeVim::command_i() check("ixxx" + escape, "xx@x" + lines); check("u", "@" + lines); -return; // combine insertions check("ia" + escape, "@a" + lines); check("ibx" + escape, "b@xa" + lines); check("icyy" + escape, "bcy@yxa" + lines); +return; // FIXME check("u", "b@xa" + lines); check("u", "@a" + lines); // undo broken checkEx("redo", "b@xa" + lines); @@ -344,11 +345,26 @@ void tst_FakeVim::command_left() move("4j", "@int main"); move("h", "@int main"); // no move over left border move("$", "argv[])@"); - move("h", "argv[]@)"); + //move("h", "argv[]@)"); + check("h", lmid(0, 4) + "\nint main(int argc, char *argv[]@)\n" + lmid(5)); move("3h", "arg@v[])"); move("50h", "@int main"); } +void tst_FakeVim::command_r() +{ + setup(); + move("4j", "@int main"); + move("$", "int main(int argc, char *argv[])@"); + check("rx", lmid(0, 4) + "\nint main(int argc, char *argv[]x@\n" + lmid(5)); + check("2h", lmid(0, 4) + "\nint main(int argc, char *argv[@]x\n" + lmid(5)); + check("4ra", lmid(0, 4) + "\nint main(int argc, char *argv[@]x\n" + lmid(5)); +return; // FIXME + check("3rb", lmid(0, 4) + "\nint main(int argc, char *argv[bb@b\n" + lmid(5)); + check("2rc", lmid(0, 4) + "\nint main(int argc, char *argv[bb@b\n" + lmid(5)); + check("h2rc",lmid(0, 4) + "\nint main(int argc, char *argv[bc@c\n" + lmid(5)); +} + void tst_FakeVim::command_right() { setup(); From 4133107a0d4f42949f8f89a461d47581af62e8e4 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 2 Jun 2009 15:38:08 +0200 Subject: [PATCH 07/25] fakevim: remove old undo hack as QPlainTextEdit's own undo works well now. --- src/plugins/fakevim/fakevimhandler.cpp | 21 --------------------- tests/auto/fakevim/main.cpp | 8 +++++++- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index ceda3253347..c233a74ee23 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -212,8 +212,6 @@ enum EventResult EventPassedToCore }; -class UndoBreaker; - class FakeVimHandler::Private { public: @@ -229,7 +227,6 @@ public: void restoreWidget(); friend class FakeVimHandler; - friend class UndoBreaker; static int shift(int key) { return key + 32; } static int control(int key) { return key + 256; } @@ -354,7 +351,6 @@ public: void undo(); void redo(); QMap m_undoCursorPosition; // revision -> position - bool m_needMoreUndo; // extra data for '.' void replay(const QString &text, int count); @@ -2412,10 +2408,7 @@ void FakeVimHandler::Private::undo() { int current = m_tc.document()->revision(); m_tc.endEditBlock(); - m_needMoreUndo = false; EDITOR(undo()); - if (m_needMoreUndo) - EDITOR(undo()); m_tc.beginEditBlock(); int rev = m_tc.document()->revision(); if (current == rev) @@ -2430,10 +2423,7 @@ void FakeVimHandler::Private::redo() { int current = m_tc.document()->revision(); m_tc.endEditBlock(); - m_needMoreUndo = false; EDITOR(redo()); - if (m_needMoreUndo) - EDITOR(redo()); m_tc.beginEditBlock(); int rev = m_tc.document()->revision(); if (rev == current) @@ -2487,20 +2477,9 @@ void FakeVimHandler::Private::recordJump() UNDO_DEBUG("jumps: " << m_jumpListUndo); } -class UndoBreaker : public QAbstractUndoItem -{ -public: - UndoBreaker(FakeVimHandler::Private *doc) : m_doc(doc) {} - void undo() { m_doc->m_needMoreUndo = true; } - void redo() { m_doc->m_needMoreUndo = true; } -private: - FakeVimHandler::Private *m_doc; -}; - void FakeVimHandler::Private::recordNewUndo() { m_tc.endEditBlock(); - m_tc.document()->appendUndoItem(new UndoBreaker(this)); m_tc.beginEditBlock(); } diff --git a/tests/auto/fakevim/main.cpp b/tests/auto/fakevim/main.cpp index 66002c9380c..ad8c1f60381 100644 --- a/tests/auto/fakevim/main.cpp +++ b/tests/auto/fakevim/main.cpp @@ -328,12 +328,18 @@ void tst_FakeVim::command_i() // combine insertions + check("i1" + escape, "@1" + lines); + check("i2" + escape, "@21" + lines); + check("i3" + escape, "@321" + lines); + check("u", "@21" + lines); + check("u", "@1" + lines); + check("u", "@" + lines); check("ia" + escape, "@a" + lines); check("ibx" + escape, "b@xa" + lines); check("icyy" + escape, "bcy@yxa" + lines); -return; // FIXME check("u", "b@xa" + lines); check("u", "@a" + lines); // undo broken +return; // FIXME checkEx("redo", "b@xa" + lines); check("u", "@a" + lines); check("u", "@" + lines); From 27609c4f00f7a06ea49d2704a181e44d9dc78532 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 2 Jun 2009 15:44:03 +0200 Subject: [PATCH 08/25] debugger: remove some debug output, also make dumper input more readable in the log. --- src/plugins/debugger/gdb/gdbengine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 5d587788485..b0a62981b5a 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -2779,7 +2779,6 @@ static void setWatchDataEditValue(WatchData &data, const GdbMi &mi) static void setWatchDataValueToolTip(WatchData &data, const GdbMi &mi, int encoding = 0) { - qDebug() << "TOOLTIP: " << mi.data().size() << "ENC:" << encoding; if (mi.isValid()) data.setValueToolTip(decodeData(mi.data(), encoding)); } @@ -3208,6 +3207,9 @@ void GdbEngine::sendWatchParameters(const QByteArray ¶ms0) } encoded[encoded.size() - 1] = '}'; + params.replace('\0','!'); + emit gdbInputAvailable(QString(), QString::fromUtf8(params)); + postCommand(_(encoded)); } From 311ca7a074733ad0f14c79bd903a79b3c81c161f Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 2 Jun 2009 16:43:09 +0200 Subject: [PATCH 09/25] fakevim: more undo work --- src/plugins/fakevim/fakevimhandler.cpp | 52 +++++++++----------------- tests/auto/fakevim/main.cpp | 9 ++--- 2 files changed, 22 insertions(+), 39 deletions(-) diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index c233a74ee23..7f28665f491 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -86,7 +86,7 @@ //#define DEBUG_UNDO 1 #if DEBUG_UNDO -# define UNDO_DEBUG(s) qDebug() << s +# define UNDO_DEBUG(s) qDebug() << << m_tc.document()->revision() << s #else # define UNDO_DEBUG(s) #endif @@ -172,26 +172,6 @@ enum MoveType MoveLineWise, }; -struct EditOperation -{ - EditOperation() : position(-1), itemCount(0) {} - int position; - int itemCount; // used to combine several operations - QString from; - QString to; -}; - -QDebug &operator<<(QDebug &ts, const EditOperation &op) -{ - if (op.itemCount > 0) { - ts << "\n EDIT BLOCK WITH " << op.itemCount << " ITEMS"; - } else { - ts << "\n EDIT AT " << op.position - << " FROM " << op.from << " TO " << op.to; - } - return ts; -} - QDebug &operator<<(QDebug &ts, const QList &sels) { foreach (QTextEdit::ExtraSelection sel, sels) @@ -307,6 +287,9 @@ public: QWidget *editor() const; QChar characterAtCursor() const { return m_tc.document()->characterAt(m_tc.position()); } + void beginEditBlock() { UNDO_DEBUG("BEGIN EDIT BLOCK"); m_tc.beginEditBlock(); } + void endEditBlock() { UNDO_DEBUG("END EDIT BLOCK"); m_tc.endEditBlock(); } + void joinPreviousEditBlock() { UNDO_DEBUG("JOIN EDIT BLOCK"); m_tc.joinPreviousEditBlock(); } public: QTextEdit *m_textedit; @@ -515,12 +498,12 @@ EventResult FakeVimHandler::Private::handleEvent(QKeyEvent *ev) } m_undoCursorPosition[m_tc.document()->revision()] = m_tc.position(); - if (m_mode == InsertMode) - m_tc.joinPreviousEditBlock(); - else - m_tc.beginEditBlock(); + //if (m_mode == InsertMode) + // joinPreviousEditBlock(); + //else + // beginEditBlock(); EventResult result = handleKey(key, um, ev->text()); - m_tc.endEditBlock(); + //endEditBlock(); // We fake vi-style end-of-line behaviour m_fakeEnd = (atEndOfLine() && m_mode == CommandMode); @@ -1908,7 +1891,7 @@ void FakeVimHandler::Private::handleExCommand(const QString &cmd0) if (flags.contains('i')) pattern.setCaseSensitivity(Qt::CaseInsensitive); const bool global = flags.contains('g'); - m_tc.beginEditBlock(); + beginEditBlock(); for (int line = beginLine; line <= endLine; ++line) { const int start = firstPositionInLine(line); const int end = lastPositionInLine(line); @@ -1934,7 +1917,7 @@ void FakeVimHandler::Private::handleExCommand(const QString &cmd0) break; } } - m_tc.endEditBlock(); + endEditBlock(); enterCommandMode(); } else if (reSet.indexIn(cmd) != -1) { // :set showBlackMessage(QString()); @@ -2407,9 +2390,9 @@ QWidget *FakeVimHandler::Private::editor() const void FakeVimHandler::Private::undo() { int current = m_tc.document()->revision(); - m_tc.endEditBlock(); + //endEditBlock(); EDITOR(undo()); - m_tc.beginEditBlock(); + //beginEditBlock(); int rev = m_tc.document()->revision(); if (current == rev) showBlackMessage(tr("Already at oldest change")); @@ -2422,9 +2405,9 @@ void FakeVimHandler::Private::undo() void FakeVimHandler::Private::redo() { int current = m_tc.document()->revision(); - m_tc.endEditBlock(); + //endEditBlock(); EDITOR(redo()); - m_tc.beginEditBlock(); + //beginEditBlock(); int rev = m_tc.document()->revision(); if (rev == current) showBlackMessage(tr("Already at newest change")); @@ -2479,8 +2462,9 @@ void FakeVimHandler::Private::recordJump() void FakeVimHandler::Private::recordNewUndo() { - m_tc.endEditBlock(); - m_tc.beginEditBlock(); + //endEditBlock(); + UNDO_DEBUG("---- BREAK ----"); + //beginEditBlock(); } void FakeVimHandler::Private::insertAutomaticIndentation(bool goingDown) diff --git a/tests/auto/fakevim/main.cpp b/tests/auto/fakevim/main.cpp index ad8c1f60381..ddc91e3a6a0 100644 --- a/tests/auto/fakevim/main.cpp +++ b/tests/auto/fakevim/main.cpp @@ -326,7 +326,6 @@ void tst_FakeVim::command_i() check("ixxx" + escape, "xx@x" + lines); check("u", "@" + lines); - // combine insertions check("i1" + escape, "@1" + lines); check("i2" + escape, "@21" + lines); @@ -338,10 +337,10 @@ void tst_FakeVim::command_i() check("ibx" + escape, "b@xa" + lines); check("icyy" + escape, "bcy@yxa" + lines); check("u", "b@xa" + lines); - check("u", "@a" + lines); // undo broken -return; // FIXME - checkEx("redo", "b@xa" + lines); - check("u", "@a" + lines); + check("u", "@a" + lines); +// FIXME undo broken +// checkEx("redo", "b@xa" + lines); +// check("u", "@a" + lines); check("u", "@" + lines); } From d7af85a09755a2a6852052b8621448ab6114ea0a Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 3 Jun 2009 12:46:55 +0200 Subject: [PATCH 10/25] debugger: implement a dumper for QAbstractItemModel This also squashes a namespace related bug introduced by the watchutils refactoring. --- share/qtcreator/gdbmacros/gdbmacros.cpp | 110 +++++++++++++++++- src/plugins/debugger/debuggeroutputwindow.cpp | 4 +- src/plugins/debugger/gdb/gdbengine.cpp | 5 +- src/plugins/debugger/watchutils.cpp | 18 ++- src/plugins/debugger/watchutils.h | 1 + tests/manual/gdbdebugger/simple/app.cpp | 17 +++ 6 files changed, 143 insertions(+), 12 deletions(-) diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp index 5f75cc8997e..1bf767002b0 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.cpp +++ b/share/qtcreator/gdbmacros/gdbmacros.cpp @@ -851,6 +851,102 @@ static void qDumpInnerValueOrPointer(QDumper &d, ////////////////////////////////////////////////////////////////////////////// +struct ModelIndex { int r; int c; void *p; void *m; }; + +static void qDumpQAbstractItem(QDumper &d) +{ + ModelIndex mm; + mm.r = mm.c = 0; + mm.p = mm.m = 0; + sscanf(d.templateParameters[0], "%d,%d,%p,%p", &mm.r, &mm.c, &mm.p, &mm.m); + const QModelIndex &mi(*reinterpret_cast(&mm)); + const QAbstractItemModel *m = mi.model(); + const int rowCount = m->rowCount(mi); + if (rowCount < 0) + return; + const int columnCount = m->columnCount(mi); + if (columnCount < 0) + return; + P(d, "type", NS"QAbstractItem"); + P(d, "addr", "$" << mm.r << "," << mm.c << "," << mm.p << "," << mm.m); + //P(d, "value", "(" << rowCount << "," << columnCount << ")"); + P(d, "value", m->data(mi, Qt::DisplayRole).toString()); + P(d, "valueencoded", "2"); + P(d, "numchild", "1"); + if (d.dumpChildren) { + d << ",children=["; + for (int row = 0; row < rowCount; ++row) { + for (int column = 0; column < columnCount; ++column) { + QModelIndex child = m->index(row, column, mi); + d.beginHash(); + P(d, "name", "[" << row << "," << column << "]"); + //P(d, "numchild", (m->hasChildren(child) ? "1" : "0")); + P(d, "numchild", "1"); + P(d, "addr", "$" << child.row() << "," << child.column() << "," + << child.internalPointer() << "," << child.model()); + P(d, "type", NS"QAbstractItem"); + P(d, "value", m->data(mi, Qt::DisplayRole).toString()); + P(d, "valueencoded", "2"); + d.endHash(); + } + } + d.beginHash(); + P(d, "name", "DisplayRole"); + P(d, "numchild", 0); + P(d, "value", m->data(mi, Qt::DisplayRole).toString()); + P(d, "valueencoded", 2); + P(d, "type", NS"QString"); + d.endHash(); + d << "]"; + } + d.disarm(); +} + +static void qDumpQAbstractItemModel(QDumper &d) +{ + const QAbstractItemModel &m = *reinterpret_cast(d.data); + + const int rowCount = m.rowCount(); + if (rowCount < 0) + return; + const int columnCount = m.columnCount(); + if (columnCount < 0) + return; + + P(d, "type", NS"QAbstractItemModel"); + P(d, "value", "(" << rowCount << "," << columnCount << ")"); + P(d, "numchild", "1"); + if (d.dumpChildren) { + d << ",children=["; + d.beginHash(); + P(d, "numchild", "1"); + P(d, "name", NS"QObject"); + P(d, "addr", d.data); + P(d, "value", m.objectName()); + P(d, "valueencoded", "2"); + P(d, "type", NS"QObject"); + P(d, "displayedtype", m.metaObject()->className()); + d.endHash(); + for (int row = 0; row < rowCount; ++row) { + for (int column = 0; column < columnCount; ++column) { + QModelIndex mi = m.index(row, column); + d.beginHash(); + P(d, "name", "[" << row << "," << column << "]"); + P(d, "value", m.data(mi, Qt::DisplayRole).toString()); + P(d, "valueencoded", "2"); + //P(d, "numchild", (m.hasChildren(mi) ? "1" : "0")); + P(d, "numchild", "1"); + P(d, "addr", "$" << mi.row() << "," << mi.column() << "," + << mi.internalPointer() << "," << mi.model()); + P(d, "type", NS"QAbstractItem"); + d.endHash(); + } + } + d << "]"; + } + d.disarm(); +} + static void qDumpQByteArray(QDumper &d) { const QByteArray &ba = *reinterpret_cast(d.data); @@ -1210,7 +1306,7 @@ static void qDumpQImage(QDumper &d) if (d.dumpChildren) { d << ",children=["; d.beginHash(); - P(d, "name", "key"); + P(d, "name", "data"); P(d, "type", NS "QImageData"); P(d, "addr", d.data); d.endHash(); @@ -2533,7 +2629,8 @@ static void handleProtocolVersion2and3(QDumper & d) d.setupTemplateParameters(); P(d, "iname", d.iname); - P(d, "addr", d.data); + if (d.data) + P(d, "addr", d.data); #ifdef QT_NO_QDATASTREAM if (d.protocolVersion == 3) { @@ -2555,6 +2652,12 @@ static void handleProtocolVersion2and3(QDumper & d) if (isEqual(type, "map")) qDumpStdMap(d); break; + case 'A': + if (isEqual(type, "QAbstractItemModel")) + qDumpQAbstractItemModel(d); + else if (isEqual(type, "QAbstractItem")) + qDumpQAbstractItem(d); + break; case 'B': if (isEqual(type, "QByteArray")) qDumpQByteArray(d); @@ -2715,6 +2818,8 @@ void *qDumpObjectData440( // They are mentioned here nevertheless. For types that are not listed // here, dumpers won't be used. d << "dumpers=[" + "\""NS"QAbstractItem\"," + "\""NS"QAbstractItemModel\"," "\""NS"QByteArray\"," "\""NS"QDateTime\"," "\""NS"QDir\"," @@ -2810,7 +2915,6 @@ void *qDumpObjectData440( d.iname = inbuffer; while (*inbuffer) ++inbuffer; ++inbuffer; d.exp = inbuffer; while (*inbuffer) ++inbuffer; ++inbuffer; d.innertype = inbuffer; while (*inbuffer) ++inbuffer; ++inbuffer; - d.iname = inbuffer; while (*inbuffer) ++inbuffer; ++inbuffer; handleProtocolVersion2and3(d); } diff --git a/src/plugins/debugger/debuggeroutputwindow.cpp b/src/plugins/debugger/debuggeroutputwindow.cpp index d50536e7ca5..9c51a5300c7 100644 --- a/src/plugins/debugger/debuggeroutputwindow.cpp +++ b/src/plugins/debugger/debuggeroutputwindow.cpp @@ -252,8 +252,8 @@ void DebuggerOutputWindow::showOutput(const QString &prefix, const QString &outp foreach (QString line, output.split("\n")) { // FIXME: QTextEdit asserts on really long lines... const int n = 3000; - //if (line.size() > n) - // line = line.left(n) + " [...] "; + if (line.size() > n) + line = line.left(n) + " [...] "; m_combinedText->appendPlainText(prefix + line); } QTextCursor cursor = m_combinedText->textCursor(); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index b0a62981b5a..770586af681 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -2813,7 +2813,7 @@ static void setWatchDataAddress(WatchData &data, const GdbMi &mi) { if (mi.isValid()) { data.addr = _(mi.data()); - if (data.exp.isEmpty()) + if (data.exp.isEmpty() && !data.addr.startsWith(_("$"))) data.exp = _("(*(") + gdbQuoteTypes(data.type) + _("*)") + data.addr + _c(')'); } } @@ -2885,7 +2885,6 @@ void GdbEngine::runDebuggingHelper(const WatchData &data0, bool dumpChildren) return; } WatchData data = data0; - QTC_ASSERT(!data.exp.isEmpty(), return); QByteArray params; QStringList extraArgs; @@ -2900,6 +2899,8 @@ void GdbEngine::runDebuggingHelper(const WatchData &data0, bool dumpChildren) QString addr; if (data.addr.startsWith(__("0x"))) addr = _("(void*)") + data.addr; + else if (data.exp.isEmpty()) // happens e.g. for QAbstractItem + addr = _("0"); else addr = _("&(") + data.exp + _c(')'); diff --git a/src/plugins/debugger/watchutils.cpp b/src/plugins/debugger/watchutils.cpp index f074ee2ddc1..887d0c7fa89 100644 --- a/src/plugins/debugger/watchutils.cpp +++ b/src/plugins/debugger/watchutils.cpp @@ -658,6 +658,7 @@ QtDumperHelper::Type QtDumperHelper::specialType(QString s) if (s.startsWith(QLatin1String("std::"))) return stdType(s.mid(5)); // Strip namespace + // FIXME: that's not a good idea as it makes all namespaces equal. const int namespaceIndex = s.lastIndexOf(QLatin1String("::")); if (namespaceIndex == -1) { // None ... check for std.. @@ -665,7 +666,7 @@ QtDumperHelper::Type QtDumperHelper::specialType(QString s) if (sType != UnknownType) return sType; } else { - s.remove(namespaceIndex + 2); + s = s.mid(namespaceIndex + 2); } if (s == QLatin1String("QObject")) return QObjectType; @@ -677,6 +678,8 @@ QtDumperHelper::Type QtDumperHelper::specialType(QString s) return QObjectSignalType; if (s == QLatin1String("QVector")) return QVectorType; + if (s == QLatin1String("QAbstractItem")) + return QAbstractItemType; if (s == QLatin1String("QMap")) return QMapType; if (s == QLatin1String("QMultiMap")) @@ -689,6 +692,7 @@ QtDumperHelper::Type QtDumperHelper::specialType(QString s) bool QtDumperHelper::needsExpressionSyntax(Type t) { switch (t) { + case QAbstractItemType: case QObjectSlotType: case QObjectSignalType: case QMapType: @@ -1058,6 +1062,7 @@ void QtDumperHelper::addSize(const QString &name, int size) break; } if (name == QLatin1String("std::wstring")) { + // FIXME: check space between > > below? m_sizeCache.insert(QLatin1String("std::basic_string,std::allocator >"), size); break; } @@ -1078,7 +1083,7 @@ QtDumperHelper::TypeData QtDumperHelper::typeData(const QString &typeName) const const Type st = simpleType(typeName); if (st != UnknownType) { td.isTemplate = false; - td.type =st; + td.type = st; return td; } // Try template @@ -1129,6 +1134,8 @@ void QtDumperHelper::evaluationParameters(const WatchData &data, if (outertype == m_qtNamespace + QLatin1String("QWidget")) outertype = m_qtNamespace + QLatin1String("QObject"); + QString inner = td.inner; + extraArgs.clear(); if (!inners.empty()) { @@ -1147,6 +1154,9 @@ void QtDumperHelper::evaluationParameters(const WatchData &data, // in rare cases we need more or less: switch (td.type) { + case QAbstractItemType: + inner = data.addr.mid(1); + break; case QObjectType: case QWidgetType: if (debugger == GdbDebugger) { @@ -1258,9 +1268,7 @@ void QtDumperHelper::evaluationParameters(const WatchData &data, inBuffer->append('\0'); inBuffer->append(data.exp.toUtf8()); inBuffer->append('\0'); - inBuffer->append(td.inner.toUtf8()); - inBuffer->append('\0'); - inBuffer->append(data.iname.toUtf8()); + inBuffer->append(inner.toUtf8()); inBuffer->append('\0'); if (debug) diff --git a/src/plugins/debugger/watchutils.h b/src/plugins/debugger/watchutils.h index e87b3cd8221..2b8ef865baf 100644 --- a/src/plugins/debugger/watchutils.h +++ b/src/plugins/debugger/watchutils.h @@ -145,6 +145,7 @@ public: UnknownType, SupportedType, // A type that requires no special handling by the dumper // Below types require special handling + QAbstractItemType, QObjectType, QWidgetType, QObjectSlotType, QObjectSignalType, QVectorType, QMapType, QMultiMapType, QMapNodeType, StdVectorType, StdDequeType, StdSetType, StdMapType, StdStackType, diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp index de12a5474c7..349055c3b2a 100644 --- a/tests/manual/gdbdebugger/simple/app.cpp +++ b/tests/manual/gdbdebugger/simple/app.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #include @@ -787,6 +788,21 @@ void testStdVector() vec.push_back(false); } +void testQStandardItemModel() +{ + QStandardItemModel m; + QStandardItem *i1, *i2, *i11; + m.appendRow(QList() + << (i1 = new QStandardItem("1")) << (new QStandardItem("a"))); + m.appendRow(QList() + << (i2 = new QStandardItem("2")) << (new QStandardItem("b"))); + i1->appendRow(QList() + << (i11 = new QStandardItem("11")) << (new QStandardItem("aa"))); + int i = 1; + ++i; + ++i; +} + void testQString() { QString str = "Hello "; @@ -1090,6 +1106,7 @@ int main(int argc, char *argv[]) QStringList list; list << "aaa" << "bbb" << "cc"; + testQStandardItemModel(); testQImage(); testNoArgumentName(1, 2, 3); testIO(); From 63a0225ea989fb607821a1747eba0f9f526703b9 Mon Sep 17 00:00:00 2001 From: dt Date: Wed, 3 Jun 2009 13:53:45 +0200 Subject: [PATCH 11/25] Fix some insignificant memory leaks. Reviewed-By: hjk --- src/plugins/coreplugin/welcomemode.cpp | 1 + src/plugins/debugger/debuggeractions.h | 3 +-- src/plugins/debugger/debuggerplugin.cpp | 1 + src/plugins/fakevim/fakevimactions.h | 3 +-- src/plugins/fakevim/fakevimplugin.cpp | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/coreplugin/welcomemode.cpp b/src/plugins/coreplugin/welcomemode.cpp index 4234b600d38..e39d64d3616 100644 --- a/src/plugins/coreplugin/welcomemode.cpp +++ b/src/plugins/coreplugin/welcomemode.cpp @@ -206,6 +206,7 @@ WelcomeMode::~WelcomeMode() { QSettings *settings = ICore::instance()->settings(); settings->setValue("General/WelcomeTab", m_d->btnGrp->checkedId()); + delete m_d->m_widget; delete m_d; } diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h index b65981957bf..c6a11a26d62 100644 --- a/src/plugins/debugger/debuggeractions.h +++ b/src/plugins/debugger/debuggeractions.h @@ -43,11 +43,10 @@ namespace Internal { class DebuggerSettings : public QObject { Q_OBJECT - public: DebuggerSettings(QObject *parent = 0); ~DebuggerSettings(); - + void insertItem(int code, Core::Utils::SavedAction *item); Core::Utils::SavedAction *item(int code) const; diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 4c09fe9d1d0..d252b2482da 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -418,6 +418,7 @@ void DebuggerPlugin::shutdown() m_manager->shutdown(); writeSettings(); + delete DebuggerSettings::instance(); //qDebug() << "DebuggerPlugin::~DebuggerPlugin"; removeObject(m_debugMode); diff --git a/src/plugins/fakevim/fakevimactions.h b/src/plugins/fakevim/fakevimactions.h index 45b3f9fb059..43ec20ed7a0 100644 --- a/src/plugins/fakevim/fakevimactions.h +++ b/src/plugins/fakevim/fakevimactions.h @@ -66,7 +66,6 @@ class FakeVimSettings : public QObject public: FakeVimSettings(); ~FakeVimSettings(); - void insertItem(int code, Core::Utils::SavedAction *item, const QString &longname = QString(), const QString &shortname = QString()); @@ -77,7 +76,7 @@ public: void readSettings(QSettings *settings); void writeSettings(QSettings *settings); -public: +private: QHash m_items; QHash m_nameToCode; QHash m_codeToName; diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 50bdb9dd9d8..1910b4905b9 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -280,6 +280,7 @@ void FakeVimPluginPrivate::shutdown() delete m_fakeVimOptionsPage; m_fakeVimOptionsPage = 0; theFakeVimSettings()->writeSettings(Core::ICore::instance()->settings()); + delete theFakeVimSettings(); } bool FakeVimPluginPrivate::initialize() From 2d84ccf5288f600d12b8f50e53108f40f37d056e Mon Sep 17 00:00:00 2001 From: Trenton Schulz Date: Wed, 3 Jun 2009 16:24:40 +0200 Subject: [PATCH 12/25] Use Qt::WA_LayoutUsesWidgetRect here for proper spacing. It's not the Mac's fault! --- src/plugins/coreplugin/welcomemode.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/coreplugin/welcomemode.cpp b/src/plugins/coreplugin/welcomemode.cpp index e39d64d3616..74a8def7b07 100644 --- a/src/plugins/coreplugin/welcomemode.cpp +++ b/src/plugins/coreplugin/welcomemode.cpp @@ -136,6 +136,8 @@ WelcomeMode::WelcomeMode() : m_d->ui.sitesTreeWidget->viewport()->setAutoFillBackground(false); m_d->ui.tutorialTreeWidget->viewport()->setAutoFillBackground(false); m_d->ui.didYouKnowTextBrowser->viewport()->setAutoFillBackground(false); + m_d->ui.helpUsLabel->setAttribute(Qt::WA_LayoutUsesWidgetRect); + m_d->ui.feedbackButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); l->addWidget(m_d->m_welcomePage); updateWelcomePage(WelcomePageData()); From dddb965f83d4a2f69920618e79596a0d14e7df8c Mon Sep 17 00:00:00 2001 From: con Date: Wed, 3 Jun 2009 15:31:30 +0200 Subject: [PATCH 13/25] Locator text was no longer selected when using shortcut. Reviewed-by: dt --- src/plugins/quickopen/quickopentoolwindow.cpp | 11 ++--------- src/plugins/quickopen/quickopentoolwindow.h | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/plugins/quickopen/quickopentoolwindow.cpp b/src/plugins/quickopen/quickopentoolwindow.cpp index 139559bee34..f6d9ae1a903 100644 --- a/src/plugins/quickopen/quickopentoolwindow.cpp +++ b/src/plugins/quickopen/quickopentoolwindow.cpp @@ -345,6 +345,8 @@ bool QuickOpenToolWindow::eventFilter(QObject *obj, QEvent *event) } else if (obj == m_fileLineEdit && event->type() == QEvent::FocusOut) { m_completionList->hide(); } else if (obj == m_fileLineEdit && event->type() == QEvent::FocusIn) { + if (static_cast(event)->reason() != Qt::MouseFocusReason) + m_fileLineEdit->selectAll(); updateCompletionList(m_fileLineEdit->typedText()); showCompletionList(); } else if (obj == this && event->type() == QEvent::ShortcutOverride) { @@ -470,15 +472,6 @@ void QuickOpenToolWindow::filterSelected() m_fileLineEdit->setFocus(); } -void QuickOpenToolWindow::focusInEvent(QFocusEvent *e) -{ - m_fileLineEdit->setFocus(e->reason()); - if (e->reason() != Qt::MouseFocusReason) { - m_fileLineEdit->selectAll(); - } - QWidget::focusInEvent(e); -} - void QuickOpenToolWindow::showEvent(QShowEvent *event) { QWidget::showEvent(event); diff --git a/src/plugins/quickopen/quickopentoolwindow.h b/src/plugins/quickopen/quickopentoolwindow.h index aa898fd5eea..50b5b920f06 100644 --- a/src/plugins/quickopen/quickopentoolwindow.h +++ b/src/plugins/quickopen/quickopentoolwindow.h @@ -76,7 +76,6 @@ private: bool eventFilter(QObject *obj, QEvent *event); void showEvent(QShowEvent *e); - void focusInEvent(QFocusEvent *e); bool isShowingTypeHereMessage() const; void showCompletionList(); From eca3b98c56afc1e86f3ffc4e378e3cb16cdb6405 Mon Sep 17 00:00:00 2001 From: mae Date: Wed, 3 Jun 2009 17:19:26 +0200 Subject: [PATCH 14/25] Use editor manager standard closing facilities for session switching --- src/plugins/projectexplorer/session.cpp | 43 +++---------------------- src/plugins/projectexplorer/session.h | 2 -- 2 files changed, 4 insertions(+), 41 deletions(-) diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 79ba761d1cb..c4a11d07e75 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -112,7 +112,7 @@ private: } // namespace ProjectExplorer using namespace ProjectExplorer; -using Internal::SessionFile; +using namespace ProjectExplorer::Internal; void SessionFile::sessionLoadingProgress() @@ -215,7 +215,6 @@ bool SessionFile::load(const QString &fileName) qWarning() << "Could not find startup project" << startupProjectPath; } - const QVariant &editorsettings = reader.restoreValue(QLatin1String("EditorSettings")); if (editorsettings.isValid()) { connect(m_core->editorManager(), SIGNAL(editorOpened(Core::IEditor *)), @@ -272,6 +271,7 @@ bool SessionFile::save(const QString &fileName) } writer.saveValue(QLatin1String("ProjectDependencies"), QVariant(depMap)); + writer.saveValue(QLatin1String("OpenEditors"), m_core->editorManager()->openedEditors().count()); writer.saveValue(QLatin1String("EditorSettings"), @@ -694,28 +694,16 @@ bool SessionManager::clear() if (debug) qDebug() << "SessionManager - clearing session ..."; - bool cancelled; - QList notClosed = requestCloseOfAllFiles(&cancelled); - - bool success = !cancelled; + bool success = m_core->editorManager()->closeAllEditors(); if (success) { if (debug) qDebug() << "SessionManager - Removing projects ..."; - QList toClose; - foreach (Project *pro, projects()) { - if (!notClosed.contains(pro)) - toClose << pro; - } - setStartupProject(0); - removeProjects(toClose); + removeProjects(projects()); } - if (!notClosed.isEmpty()) - success = false; - if (debug) qDebug() << "SessionManager - clearing session result is " << success; @@ -883,29 +871,6 @@ void SessionManager::setEditorCodec(Core::IEditor *editor, const QString &fileNa textEditor->setTextCodec(project->editorConfiguration()->defaultTextCodec()); } -QList SessionManager::requestCloseOfAllFiles(bool *cancelled) -{ - *cancelled = false; - QList filesToClose; - foreach (Project *pro, projects()) - filesToClose << pro->file(); - foreach (Core::IEditor *editor, m_core->editorManager()->openedEditors()) - filesToClose << editor->file(); - QList notClosed; - if (!filesToClose.isEmpty()) - notClosed = m_core->fileManager()->saveModifiedFiles(filesToClose, cancelled); - // close editors here by hand - if (!*cancelled) { - QList editorsToClose; - foreach (Core::IEditor *editor, m_core->editorManager()->openedEditors()) - if (!notClosed.contains(editor->file())) - editorsToClose << editor; - m_core->editorManager()->closeEditors(editorsToClose, false); - // project files are closed/removed later (in this::clear) - } - return Core::Utils::qwConvertList(notClosed); -} - Core::IFile *SessionManager::file() const { return m_file; diff --git a/src/plugins/projectexplorer/session.h b/src/plugins/projectexplorer/session.h index b2131595219..c0099b591f9 100644 --- a/src/plugins/projectexplorer/session.h +++ b/src/plugins/projectexplorer/session.h @@ -180,8 +180,6 @@ private: QStringList dependenciesOrder() const; Project *defaultStartupProject() const; - QList requestCloseOfAllFiles(bool *cancelled); - void updateName(const QString &session); Core::ICore *m_core; From 0656abe04839aa898902e8054f4e64807af1068b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Wed, 3 Jun 2009 13:11:48 +0200 Subject: [PATCH 15/25] Updated version of Qt libs to patch on Linux --- src/tools/qpatch/files-to-patch-linux | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/tools/qpatch/files-to-patch-linux b/src/tools/qpatch/files-to-patch-linux index da166075843..4c7b5fd6349 100644 --- a/src/tools/qpatch/files-to-patch-linux +++ b/src/tools/qpatch/files-to-patch-linux @@ -235,26 +235,26 @@ examples/xml/xmlstreamlint/xmlstreamlint examples/xmlpatterns/filetree/filetree examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel examples/xmlpatterns/recipes/recipes -lib/libQt3Support.so.4.5.1 -lib/libQtAssistantClient.so.4.5.1 -lib/libQtCLucene.so.4.5.1 -lib/libQtCore.so.4.5.1 -lib/libQtDBus.so.4.5.1 -lib/libQtDesigner.so.4.5.1 -lib/libQtDesignerComponents.so.4.5.1 -lib/libQtGui.so.4.5.1 -lib/libQtHelp.so.4.5.1 -lib/libQtNetwork.so.4.5.1 -lib/libQtOpenGL.so.4.5.1 -lib/libQtScript.so.4.5.1 -lib/libQtScriptTools.so.4.5.1 -lib/libQtSql.so.4.5.1 -lib/libQtSvg.so.4.5.1 -lib/libQtTest.so.4.5.1 +lib/libQt3Support.so.4.5.2 +lib/libQtAssistantClient.so.4.5.2 +lib/libQtCLucene.so.4.5.2 +lib/libQtCore.so.4.5.2 +lib/libQtDBus.so.4.5.2 +lib/libQtDesigner.so.4.5.2 +lib/libQtDesignerComponents.so.4.5.2 +lib/libQtGui.so.4.5.2 +lib/libQtHelp.so.4.5.2 +lib/libQtNetwork.so.4.5.2 +lib/libQtOpenGL.so.4.5.2 +lib/libQtScript.so.4.5.2 +lib/libQtScriptTools.so.4.5.2 +lib/libQtSql.so.4.5.2 +lib/libQtSvg.so.4.5.2 +lib/libQtTest.so.4.5.2 lib/libQtUiTools.a -lib/libQtWebKit.so.4.5.1 -lib/libQtXml.so.4.5.1 -lib/libQtXmlPatterns.so.4.5.1 +lib/libQtWebKit.so.4.5.2 +lib/libQtXml.so.4.5.2 +lib/libQtXmlPatterns.so.4.5.2 plugins/accessible/libqtaccessiblecompatwidgets.so plugins/accessible/libqtaccessiblewidgets.so plugins/codecs/libqcncodecs.so From 4505d92be54a78dc2ca349e47ebee5b0199a65d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Wed, 3 Jun 2009 17:29:50 +0200 Subject: [PATCH 16/25] Fixed compile error with gcc 3.3 sorry, unimplemented: `method_call_expr' not supported by dump_expr --- src/plugins/quickopen/quickopenplugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/quickopen/quickopenplugin.cpp b/src/plugins/quickopen/quickopenplugin.cpp index ae64e8dfe51..9402d6ad127 100644 --- a/src/plugins/quickopen/quickopenplugin.cpp +++ b/src/plugins/quickopen/quickopenplugin.cpp @@ -162,7 +162,8 @@ static void loadSettingsHelper(QuickOpenPlugin *p, S *settings) } settings->beginGroup("CustomFilters"); QList customFilters; - foreach (const QString &key, settings->childKeys()) { + const QStringList keys = settings->childKeys(); + foreach (const QString &key, keys) { IQuickOpenFilter *filter = new DirectoryFilter; filter->restoreState(settings->value(key).toByteArray()); p->m_filters.append(filter); From 240a6ec55cb7467af712bdade804a79d7a21ba48 Mon Sep 17 00:00:00 2001 From: con Date: Wed, 3 Jun 2009 17:39:08 +0200 Subject: [PATCH 17/25] Fixes locator's show method in case the filter already has focus. Was making the "f" filter unusable, because the popup was hidden when selecting a directory. Reviewed-by: dt --- src/plugins/quickopen/quickopentoolwindow.cpp | 15 +++++++++------ src/plugins/quickopen/quickopentoolwindow.h | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/plugins/quickopen/quickopentoolwindow.cpp b/src/plugins/quickopen/quickopentoolwindow.cpp index f6d9ae1a903..9d7ada56be4 100644 --- a/src/plugins/quickopen/quickopentoolwindow.cpp +++ b/src/plugins/quickopen/quickopentoolwindow.cpp @@ -296,7 +296,7 @@ QuickOpenToolWindow::QuickOpenToolWindow(QuickOpenPlugin *qop) : connect(m_refreshAction, SIGNAL(triggered()), m_quickOpenPlugin, SLOT(refresh())); connect(m_configureAction, SIGNAL(triggered()), this, SLOT(showConfigureDialog())); connect(m_fileLineEdit, SIGNAL(textEdited(const QString&)), - this, SLOT(textEdited(const QString&))); + this, SLOT(showPopup())); connect(m_completionList, SIGNAL(activated(QModelIndex)), this, SLOT(acceptCurrentEntry())); } @@ -347,8 +347,7 @@ bool QuickOpenToolWindow::eventFilter(QObject *obj, QEvent *event) } else if (obj == m_fileLineEdit && event->type() == QEvent::FocusIn) { if (static_cast(event)->reason() != Qt::MouseFocusReason) m_fileLineEdit->selectAll(); - updateCompletionList(m_fileLineEdit->typedText()); - showCompletionList(); + showPopup(); } else if (obj == this && event->type() == QEvent::ShortcutOverride) { QKeyEvent *ke = static_cast(event); if (ke->key() == Qt::Key_Escape && !ke->modifiers()) { @@ -369,9 +368,9 @@ void QuickOpenToolWindow::showCompletionList() m_completionList->show(); } -void QuickOpenToolWindow::textEdited(const QString &text) +void QuickOpenToolWindow::showPopup() { - updateCompletionList(text); + updateCompletionList(m_fileLineEdit->typedText()); showCompletionList(); } @@ -440,7 +439,11 @@ void QuickOpenToolWindow::show(const QString &text, int selectionStart, int sele { m_fileLineEdit->hideHintText(); m_fileLineEdit->setText(text); - setFocus(); + if (!m_fileLineEdit->hasFocus()) + m_fileLineEdit->setFocus(); + else + showPopup(); + if (selectionStart >= 0) m_fileLineEdit->setSelection(selectionStart, selectionLength); else diff --git a/src/plugins/quickopen/quickopentoolwindow.h b/src/plugins/quickopen/quickopentoolwindow.h index 50b5b920f06..2a8dc03a9ed 100644 --- a/src/plugins/quickopen/quickopentoolwindow.h +++ b/src/plugins/quickopen/quickopentoolwindow.h @@ -67,7 +67,7 @@ public: void show(const QString &text, int selectionStart = -1, int selectionLength = 0); private slots: - void textEdited(const QString &text); + void showPopup(); void acceptCurrentEntry(); void filterSelected(); void showConfigureDialog(); From 93571f7d42a81a8236ceac1f745ef277f194f1ca Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Jun 2009 19:04:10 +0200 Subject: [PATCH 18/25] assign right variable --- src/shared/proparser/profileevaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index d756b6430bd..2c40fc9e866 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -1306,7 +1306,7 @@ QStringList ProFileEvaluator::Private::evaluateFunction( if (m_valuemapStack.count() >= 100) { q->errorMessage(format("ran into infinite recursion (depth > 100).")); - ok = false; + oki = false; } else { State sts = m_sts; m_valuemapStack.push(m_valuemap); From e083ad2920d6e5695f309fe5b4b7c7d1b3060d61 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Jun 2009 19:04:43 +0200 Subject: [PATCH 19/25] expand arguments to s// operator --- src/shared/proparser/profileevaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index 2c40fc9e866..0a352e2b0b2 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -893,7 +893,7 @@ void ProFileEvaluator::Private::visitProValue(ProValue *value) { // DEFINES ~= s/a/b/?[gqi] - // FIXME: qmake variable-expands val first. + doVariableReplace(&val); if (val.length() < 4 || val[0] != QLatin1Char('s')) { q->logMessage(format("the ~= operator can handle only the s/// function.")); break; From 3df7a2c301379e98b0e96664a9180a8f8d666f0b Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 3 Jun 2009 20:19:47 +0200 Subject: [PATCH 20/25] Fixes: Fix overlapping alpha values in expander area Details: There are platform differences when drawing overlapping alpha rects here. The workaround was to simply avoid using alpha values for now. --- src/plugins/texteditor/basetexteditor.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index b6b7408f16c..44ab1dab1fe 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -2257,13 +2257,17 @@ static void drawRectBox(QPainter *painter, const QRect &rect, bool start, bool e { painter->save(); painter->setRenderHint(QPainter::Antialiasing, false); - QColor c = pal.highlight().color(); - c.setAlpha(40); + + QRgb b = pal.base().color().rgb(); + QRgb h = pal.highlight().color().rgb(); + QColor c = QColor((qRed(b)*2+qRed(h))/3, + (qGreen(b)*2+qGreen(h))/3, + (qBlue(b)*2+qBlue(h))/3); + QLinearGradient grad(rect.topLeft(), rect.topRight()); - grad.setColorAt(0, c.darker(130)); + grad.setColorAt(0, c.lighter(110)); grad.setColorAt(1, c.lighter(160)); - QColor outline = c.darker(110); - outline.setAlpha(100); + QColor outline = c; QRect r = rect; painter->fillRect(rect, grad); From d2a8449bea58275723e769cd41c085468cb56295 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Jun 2009 20:45:49 +0200 Subject: [PATCH 21/25] ifdef Q_?S_* cleanup - clear up some Q_OS_LINUX vs. Q_OS_UNIX - clear up Q_WS_* vs. Q_OS_* (relatively theoretical exercise) - use proper #if-#else cascades instead of free-standing #ifs --- src/app/main.cpp | 6 +- src/libs/utils/abstractprocess.h | 2 +- src/libs/utils/pathchooser.cpp | 5 +- src/plugins/bookmarks/bookmarksplugin.cpp | 6 +- .../actionmanager/actionmanager.cpp | 2 +- .../editormanager/editormanager.cpp | 10 +-- src/plugins/coreplugin/fancyactionbar.cpp | 2 +- src/plugins/coreplugin/fileiconprovider.cpp | 4 +- src/plugins/coreplugin/mainwindow.cpp | 22 +++---- src/plugins/coreplugin/mainwindow.h | 2 +- src/plugins/coreplugin/modemanager.cpp | 2 +- src/plugins/coreplugin/navigationwidget.cpp | 2 +- src/plugins/coreplugin/outputpane.cpp | 6 +- src/plugins/coreplugin/stylehelper.cpp | 2 +- src/plugins/cpaster/cpasterplugin.cpp | 4 +- src/plugins/cpptools/cppcodecompletion.cpp | 2 +- src/plugins/debugger/debuggerplugin.cpp | 4 +- src/plugins/debugger/gdb/gdbengine.cpp | 62 ++++++++----------- src/plugins/debugger/stackwindow.cpp | 2 +- src/plugins/find/findtoolbar.cpp | 4 +- src/plugins/git/gitplugin.cpp | 18 +++--- src/plugins/help/centralwidget.cpp | 8 +-- src/plugins/help/helpplugin.cpp | 4 +- .../projectexplorer/debugginghelper.cpp | 3 +- .../projectexplorer/projecttreewidget.cpp | 2 +- src/plugins/qt4projectmanager/qmakestep.cpp | 2 +- .../qt4projectmanager/qtversionmanager.cpp | 3 +- src/plugins/subversion/subversionplugin.cpp | 6 +- src/plugins/texteditor/basetexteditor.cpp | 2 +- src/plugins/texteditor/completionwidget.cpp | 2 +- src/plugins/texteditor/fontsettings.cpp | 2 +- .../texteditor/texteditoractionhandler.cpp | 4 +- src/plugins/texteditor/texteditorplugin.cpp | 2 +- src/shared/help/bookmarkmanager.cpp | 13 ++-- src/shared/help/indexwindow.cpp | 2 +- src/shared/proparser/profileevaluator.cpp | 2 +- src/shared/qtlockedfile/qtlockedfile.h | 2 +- 37 files changed, 110 insertions(+), 118 deletions(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index e1800de1f11..5199c7c7e64 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -46,7 +46,7 @@ #include #include -#ifdef Q_OS_DARWIN +#ifdef Q_OS_MAC # include #endif @@ -71,7 +71,7 @@ static const char *CLIENT_OPTION = "-client"; typedef QList PluginSpecSet; // Helpers for displaying messages. Note that there is no console on Windows. -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN // Format as
 HTML
 static inline void toHtml(QString &t)
 {
@@ -204,7 +204,7 @@ static inline QStringList getPluginPaths()
 
 int main(int argc, char **argv)
 {
-#ifdef Q_OS_DARWIN
+#ifdef Q_OS_MAC
     // increase the number of file that can be opened in Qt Creator.
     struct rlimit rl;
     getrlimit(RLIMIT_NOFILE, &rl);
diff --git a/src/libs/utils/abstractprocess.h b/src/libs/utils/abstractprocess.h
index b7edcd889ec..db24b0ca4e5 100644
--- a/src/libs/utils/abstractprocess.h
+++ b/src/libs/utils/abstractprocess.h
@@ -59,7 +59,7 @@ public:
 //signals:
     virtual void processError(const QString &error) = 0;
 
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
     // Add PATH and SystemRoot environment variables in case they are missing
     static QStringList fixWinEnvironment(const QStringList &env);
     // Quote a Windows command line correctly for the "CreateProcess" API
diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp
index efc49881c98..be494fb5aff 100644
--- a/src/libs/utils/pathchooser.cpp
+++ b/src/libs/utils/pathchooser.cpp
@@ -44,11 +44,10 @@
 #include 
 #include 
 
-#ifdef Q_OS_MAC
 /*static*/ const char * const Core::Utils::PathChooser::browseButtonLabel =
+#ifdef Q_WS_MAC
                    QT_TRANSLATE_NOOP("Core::Utils::PathChooser", "Choose...");
 #else
-/*static*/ const char * const Core::Utils::PathChooser::browseButtonLabel =
                    QT_TRANSLATE_NOOP("Core::Utils::PathChooser", "Browse...");
 #endif
 
@@ -128,7 +127,7 @@ PathChooser::~PathChooser()
 
 void PathChooser::addButton(const QString &text, QObject *receiver, const char *slotFunc)
 {
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     QPushButton *button = new QPushButton;
 #else
     QToolButton *button = new QToolButton;
diff --git a/src/plugins/bookmarks/bookmarksplugin.cpp b/src/plugins/bookmarks/bookmarksplugin.cpp
index 3d5cdf2bda8..ab1d5239c2c 100644
--- a/src/plugins/bookmarks/bookmarksplugin.cpp
+++ b/src/plugins/bookmarks/bookmarksplugin.cpp
@@ -86,7 +86,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
     m_toggleAction = new QAction(tr("Toggle Bookmark"), this);
     Core::Command *cmd =
         am->registerAction(m_toggleAction, BOOKMARKS_TOGGLE_ACTION, textcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+M")));
 #else
     cmd->setDefaultKeySequence(QKeySequence(tr("Meta+M")));
@@ -116,7 +116,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
     //Previous
     m_prevAction = new QAction(tr("Previous Bookmark"), this);
     cmd = am->registerAction(m_prevAction, BOOKMARKS_PREV_ACTION, globalcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+,")));
 #else
     cmd->setDefaultKeySequence(QKeySequence(tr("Meta+,")));
@@ -126,7 +126,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
     //Next
     m_nextAction = new QAction(tr("Next Bookmark"), this);
     cmd = am->registerAction(m_nextAction, BOOKMARKS_NEXT_ACTION, globalcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+.")));
 #else
     cmd->setDefaultKeySequence(QKeySequence(tr("Meta+.")));
diff --git a/src/plugins/coreplugin/actionmanager/actionmanager.cpp b/src/plugins/coreplugin/actionmanager/actionmanager.cpp
index 608956623e1..304f7cf12f2 100644
--- a/src/plugins/coreplugin/actionmanager/actionmanager.cpp
+++ b/src/plugins/coreplugin/actionmanager/actionmanager.cpp
@@ -361,7 +361,7 @@ Command *ActionManagerPrivate::registerOverridableAction(QAction *action, const
         baseAction->setEnabled(false);
         baseAction->setObjectName(id);
         baseAction->setParent(m_mainWnd);
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
         baseAction->setIconVisibleInMenu(false);
 #endif
         a->setAction(baseAction);
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index e4edc05d2be..364098b63bb 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -344,7 +344,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
 
     m_d->m_splitAction = new QAction(tr("Split"), this);
     cmd = am->registerAction(m_d->m_splitAction, Constants::SPLIT, editManagerContext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E,2")));
 #endif
     mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
@@ -352,7 +352,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
 
     m_d->m_splitSideBySideAction = new QAction(tr("Split Side by Side"), this);
     cmd = am->registerAction(m_d->m_splitSideBySideAction, Constants::SPLIT_SIDE_BY_SIDE, editManagerContext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E,3")));
 #endif
     mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
@@ -360,7 +360,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
 
     m_d->m_removeCurrentSplitAction = new QAction(tr("Remove Current Split"), this);
     cmd = am->registerAction(m_d->m_removeCurrentSplitAction, Constants::REMOVE_CURRENT_SPLIT, editManagerContext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E,0")));
 #endif
     mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
@@ -368,7 +368,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
 
     m_d->m_removeAllSplitsAction = new QAction(tr("Remove All Splits"), this);
     cmd = am->registerAction(m_d->m_removeAllSplitsAction, Constants::REMOVE_ALL_SPLITS, editManagerContext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E,1")));
 #endif
     mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
@@ -376,7 +376,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
 
     m_d->m_gotoOtherSplitAction = new QAction(tr("Goto Other Split"), this);
     cmd = am->registerAction(m_d->m_gotoOtherSplitAction, Constants::GOTO_OTHER_SPLIT, editManagerContext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E,o")));
 #endif
     mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
diff --git a/src/plugins/coreplugin/fancyactionbar.cpp b/src/plugins/coreplugin/fancyactionbar.cpp
index b14491ae726..318cf82ff3a 100644
--- a/src/plugins/coreplugin/fancyactionbar.cpp
+++ b/src/plugins/coreplugin/fancyactionbar.cpp
@@ -85,7 +85,7 @@ void FancyToolButton::paintEvent(QPaintEvent *event)
     QPainter p(this);
     p.drawPicture(0, 0, m_buttonElements.value(svgIdButtonBase));
     p.drawPicture(0, 0, m_buttonElements.value(isDown() ? svgIdButtonPressedBase : svgIdButtonNormalBase));
-#ifndef Q_WS_MAC // Mac UI's dont usually do hover
+#ifndef Q_WS_MAC // Mac UIs usually don't hover
     if (underMouse() && isEnabled())
         p.drawPicture(0, 0, m_buttonElements.value(svgIdButtonHoverOverlay));
 #endif
diff --git a/src/plugins/coreplugin/fileiconprovider.cpp b/src/plugins/coreplugin/fileiconprovider.cpp
index b5926a951eb..34a58d57440 100644
--- a/src/plugins/coreplugin/fileiconprovider.cpp
+++ b/src/plugins/coreplugin/fileiconprovider.cpp
@@ -70,7 +70,7 @@ QIcon FileIconProvider::icon(const QFileInfo &fileInfo)
 
         // Disabled since for now we'll make sure that all icons fit with our
         // own custom icons by returning an empty one if we don't know it.
-#ifdef Q_OS_WIN
+#ifdef Q_WS_WIN
         // This is incorrect if the OS does not always return the same icon for the
         // same suffix (Mac OS X), but should speed up the retrieval a lot ...
         icon = m_systemIconProvider.icon(fileInfo);
@@ -123,7 +123,7 @@ void FileIconProvider::registerIconOverlayForSuffix(const QIcon &icon, const QSt
 QIcon FileIconProvider::iconForSuffix(const QString &suffix) const
 {
     QIcon icon;
-#ifndef Q_OS_WIN // On windows we use the file system icons
+#ifndef Q_WS_WIN // On windows we use the file system icons
     if (suffix.isEmpty())
         return icon;
 
diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp
index 07ff1132942..3520bd0cd88 100644
--- a/src/plugins/coreplugin/mainwindow.cpp
+++ b/src/plugins/coreplugin/mainwindow.cpp
@@ -144,7 +144,7 @@ MainWindow::MainWindow() :
     m_optionsAction(0),
     m_toggleSideBarAction(0),
     m_toggleFullScreenAction(0),
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     m_minimizeAction(0),
     m_zoomAction(0),
 #endif
@@ -153,7 +153,7 @@ MainWindow::MainWindow() :
     OutputPaneManager::create();
 
     setWindowTitle(tr("Qt Creator"));
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     qApp->setWindowIcon(QIcon(":/core/images/qtcreator_logo_128.png"));
 #endif
     QCoreApplication::setApplicationName(QLatin1String("QtCreator"));
@@ -597,7 +597,7 @@ void MainWindow::registerDefaultActions()
     // Save As Action
     tmpaction = new QAction(tr("Save &As..."), this);
     cmd = am->registerAction(tmpaction, Constants::SAVEAS, m_globalContext);
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S")));
 #endif
     cmd->setAttribute(Command::CA_UpdateText);
@@ -607,7 +607,7 @@ void MainWindow::registerDefaultActions()
     // SaveAll Action
     m_saveAllAction = new QAction(tr("Save A&ll"), this);
     cmd = am->registerAction(m_saveAllAction, Constants::SAVEALL, m_globalContext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S")));
 #endif
     mfile->addAction(cmd, Constants::G_FILE_SAVE);
@@ -681,13 +681,13 @@ void MainWindow::registerDefaultActions()
     // Options Action
     m_optionsAction = new QAction(tr("&Options..."), this);
     cmd = am->registerAction(m_optionsAction, Constants::OPTIONS, m_globalContext);
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     cmd->setDefaultKeySequence(QKeySequence("Ctrl+,"));
 #endif
     mtools->addAction(cmd, Constants::G_DEFAULT_THREE);
     connect(m_optionsAction, SIGNAL(triggered()), this, SLOT(showOptionsDialog()));
 
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     // Minimize Action
     m_minimizeAction = new QAction(tr("Minimize"), this);
     cmd = am->registerAction(m_minimizeAction, Constants::MINIMIZE_WINDOW, m_globalContext);
@@ -711,7 +711,7 @@ void MainWindow::registerDefaultActions()
                                         tr("Show Sidebar"), this);
     m_toggleSideBarAction->setCheckable(true);
     cmd = am->registerAction(m_toggleSideBarAction, Constants::TOGGLE_SIDEBAR, m_globalContext);
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     cmd->setDefaultKeySequence(QKeySequence("Ctrl+0"));
 #else
     cmd->setDefaultKeySequence(QKeySequence("Alt+0"));
@@ -721,7 +721,7 @@ void MainWindow::registerDefaultActions()
     mwindow->addAction(cmd, Constants::G_WINDOW_PANES);
     m_toggleSideBarAction->setEnabled(false);
 
-#if !defined(Q_OS_MAC)
+#ifndef Q_WS_MAC
     // Full Screen Action
     m_toggleFullScreenAction = new QAction(tr("Full Screen"), this);
     m_toggleFullScreenAction->setCheckable(true);
@@ -732,7 +732,7 @@ void MainWindow::registerDefaultActions()
 #endif
 
     // About IDE Action
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     tmpaction = new QAction(tr("About &Qt Creator"), this); // it's convention not to add dots to the about menu
 #else
     tmpaction = new QAction(tr("About &Qt Creator..."), this);
@@ -746,7 +746,7 @@ void MainWindow::registerDefaultActions()
     cmd = am->registerAction(tmpaction, Constants::ABOUT_PLUGINS, m_globalContext);
     mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
     tmpaction->setEnabled(true);
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
 #endif
     connect(tmpaction, SIGNAL(triggered()), this,  SLOT(aboutPlugins()));
@@ -1022,7 +1022,7 @@ void MainWindow::changeEvent(QEvent *e)
             emit windowActivated();
         }
     } else if (e->type() == QEvent::WindowStateChange) {
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
         bool minimized = isMinimized();
         if (debugMainWindow)
             qDebug() << "main window state changed to minimized=" << minimized;
diff --git a/src/plugins/coreplugin/mainwindow.h b/src/plugins/coreplugin/mainwindow.h
index 7886d7795d1..997a0c26d9e 100644
--- a/src/plugins/coreplugin/mainwindow.h
+++ b/src/plugins/coreplugin/mainwindow.h
@@ -208,7 +208,7 @@ private:
     QAction *m_optionsAction;
     QAction *m_toggleSideBarAction;
     QAction *m_toggleFullScreenAction;
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     QAction *m_minimizeAction;
     QAction *m_zoomAction;
 #endif
diff --git a/src/plugins/coreplugin/modemanager.cpp b/src/plugins/coreplugin/modemanager.cpp
index f54a9378a6b..d514aa0022d 100644
--- a/src/plugins/coreplugin/modemanager.cpp
+++ b/src/plugins/coreplugin/modemanager.cpp
@@ -147,7 +147,7 @@ void ModeManager::objectAdded(QObject *obj)
     m_modeShortcuts.insert(index, cmd);
     connect(cmd, SIGNAL(keySequenceChanged()), this, SLOT(updateModeToolTip()));
     for (int i = 0; i < m_modeShortcuts.size(); ++i) {
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
         m_modeShortcuts.at(i)->setDefaultKeySequence(QKeySequence(QString("Meta+%1").arg(i+1)));
 #else
         m_modeShortcuts.at(i)->setDefaultKeySequence(QKeySequence(QString("Ctrl+%1").arg(i+1)));
diff --git a/src/plugins/coreplugin/navigationwidget.cpp b/src/plugins/coreplugin/navigationwidget.cpp
index 091d19c2510..d93abca335e 100644
--- a/src/plugins/coreplugin/navigationwidget.cpp
+++ b/src/plugins/coreplugin/navigationwidget.cpp
@@ -363,7 +363,7 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget)
 
     m_navigationComboBox = new NavComboBox(this);
     m_navigationWidget = 0;
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     // this is to avoid ugly tool bar behavior
     m_navigationComboBox->setMaximumWidth(130);
 #endif
diff --git a/src/plugins/coreplugin/outputpane.cpp b/src/plugins/coreplugin/outputpane.cpp
index 685327c5592..ba27f6771af 100644
--- a/src/plugins/coreplugin/outputpane.cpp
+++ b/src/plugins/coreplugin/outputpane.cpp
@@ -207,7 +207,7 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
     m_buttonsWidget = new QWidget;
     m_buttonsWidget->setLayout(new QHBoxLayout);
     m_buttonsWidget->layout()->setContentsMargins(5,0,0,0);
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     m_buttonsWidget->layout()->setSpacing(16);
 #else
     m_buttonsWidget->layout()->setSpacing(4);
@@ -299,7 +299,7 @@ void OutputPaneManager::init()
 
         Command *cmd = am->registerAction(action, actionId, QList() << Constants::C_GLOBAL_ID);
         if (outPane->priorityInStatusBar() != -1) {
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
             cmd->setDefaultKeySequence(QKeySequence(paneShortCut(Qt::CTRL, shortcutNumber)));
 #else
             cmd->setDefaultKeySequence(QKeySequence(paneShortCut(Qt::ALT, shortcutNumber)));
@@ -567,7 +567,7 @@ OutputPaneToggleButton::OutputPaneToggleButton(int number, const QString &text,
             "QPushButton { border-image: url(:/core/images/panel_button.png) 2 2 2 19;"
                          " border-width: 2px 2px 2px 19px; padding-left: -17; padding-right: 4 } "
             "QPushButton:checked { border-image: url(:/core/images/panel_button_checked.png) 2 2 2 19 } "
-#ifndef Q_WS_MAC // Mac UI's dont usually do hover
+#ifndef Q_WS_MAC // Mac UIs usually don't hover
             "QPushButton:checked:hover { border-image: url(:/core/images/panel_button_checked_hover.png) 2 2 2 19 } "
             "QPushButton:pressed:hover { border-image: url(:/core/images/panel_button_pressed.png) 2 2 2 19 } "
             "QPushButton:hover { border-image: url(:/core/images/panel_button_hover.png) 2 2 2 19 } "
diff --git a/src/plugins/coreplugin/stylehelper.cpp b/src/plugins/coreplugin/stylehelper.cpp
index b46f751e009..42ca012cf31 100644
--- a/src/plugins/coreplugin/stylehelper.cpp
+++ b/src/plugins/coreplugin/stylehelper.cpp
@@ -50,7 +50,7 @@ static int range(float x, int min, int max)
 
 qreal StyleHelper::sidebarFontSize()
 {
-#if defined(Q_OS_MAC)
+#if defined(Q_WS_MAC)
     return 9;
 #else
     return 7.5;
diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp
index 6af357ca805..f407e1b1000 100644
--- a/src/plugins/cpaster/cpasterplugin.cpp
+++ b/src/plugins/cpaster/cpasterplugin.cpp
@@ -100,7 +100,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_m
 
     m_postAction = new QAction(tr("Paste Snippet..."), this);
     command = actionManager->registerAction(m_postAction, "CodePaster.Post", globalcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+P")));
 #endif
     connect(m_postAction, SIGNAL(triggered()), this, SLOT(post()));
@@ -108,7 +108,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_m
 
     m_fetchAction = new QAction(tr("Fetch Snippet..."), this);
     command = actionManager->registerAction(m_fetchAction, "CodePaster.Fetch", globalcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+F")));
 #endif
     connect(m_fetchAction, SIGNAL(triggered()), this, SLOT(fetch()));
diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp
index 384058685b5..d69d683f819 100644
--- a/src/plugins/cpptools/cppcodecompletion.cpp
+++ b/src/plugins/cpptools/cppcodecompletion.cpp
@@ -405,7 +405,7 @@ void FunctionArgumentWidget::updateHintText()
     m_popupFrame->setFixedWidth(m_popupFrame->minimumSizeHint().width());
 
     const QDesktopWidget *desktop = QApplication::desktop();
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     const QRect screen = desktop->availableGeometry(desktop->screenNumber(m_editor->widget()));
 #else
     const QRect screen = desktop->screenGeometry(desktop->screenNumber(m_editor->widget()));
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index d252b2482da..60db690d214 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -112,7 +112,7 @@ const char * const BREAK_BY_FUNCTION    = "Debugger.BreakByFunction";
 const char * const BREAK_AT_MAIN        = "Debugger.BreakAtMain";
 const char * const ADD_TO_WATCH         = "Debugger.AddToWatch";
 
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
 const char * const INTERRUPT_KEY            = "Shift+F5";
 const char * const RESET_KEY                = "Ctrl+Shift+F5";
 const char * const STEP_KEY                 = "F7";
@@ -1136,7 +1136,7 @@ void DebuggerPlugin::readSettings()
     DebuggerSettings::instance()->readSettings(s);
 
     QString defaultCommand("gdb");
-#if defined(Q_OS_WIN32)
+#ifdef Q_OS_WIN
     defaultCommand.append(".exe");
 #endif
     //QString defaultScript = ICore::instance()->resourcePath() +
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 770586af681..9b0ae33cf80 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -72,7 +72,7 @@
 #    include "shared/sharedlibraryinjector.h"
 #endif
 
-#if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
+#ifdef Q_OS_UNIX
 #include 
 #include 
 #endif
@@ -826,12 +826,10 @@ void GdbEngine::handleInfoThreads(const GdbResultRecord &record, const QVariant
 void GdbEngine::handleInfoProc(const GdbResultRecord &record, const QVariant &)
 {
     if (record.resultClass == GdbResultDone) {
-        #if defined(Q_OS_MAC)
+        #ifdef Q_OS_MAC
         //^done,process-id="85075"
         maybeHandleInferiorPidChanged(_(record.data.findChild("process-id").data()));
-        #endif
-
-        #if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
+        #else
         // FIXME: use something more robust
         QRegExp re(__("process (\\d+)"));
         QString data = __(record.data.findChild("consolestreamoutput").data());
@@ -919,14 +917,12 @@ static bool isStoppedReason(const QByteArray &reason)
 
 void GdbEngine::handleAqcuiredInferior()
 {
-    #if defined(Q_OS_WIN)
+    #ifdef Q_OS_WIN
     postCommand(_("info thread"), CB(handleInfoThreads));
-    #endif
-    #if defined(Q_OS_LINUX)
-    postCommand(_("info proc"), CB(handleInfoProc));
-    #endif
-    #if defined(Q_OS_MAC)
+    #elif defined(Q_OS_MAC)
     postCommand(_("info pid"), NeedsStop, CB(handleInfoProc));
+    #else
+    postCommand(_("info proc"), CB(handleInfoProc));
     #endif
     if (theDebuggerBoolSetting(ListSourceFiles))
         reloadSourceFiles();
@@ -1883,23 +1879,21 @@ void GdbEngine::sendInsertBreakpoint(int index)
 
     // set up fallback in case of pending breakpoints which aren't handled
     // by the MI interface
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
-    QString cmd = _("-break-insert -f ");
-    //if (!data->condition.isEmpty())
-    //    cmd += _("-c ") + data->condition + ' ';
-    cmd += where;
-#endif
-#if defined(Q_OS_MAC)
-    QString cmd = _("-break-insert -l -1 ");
-    //if (!data->condition.isEmpty())
-    //    cmd += "-c " + data->condition + " ";
-    cmd += where;
-#endif
 #if defined(Q_OS_WIN)
     QString cmd = _("-break-insert ");
     //if (!data->condition.isEmpty())
     //    cmd += "-c " + data->condition + " ";
     cmd += where;
+#elif defined(Q_OS_MAC)
+    QString cmd = _("-break-insert -l -1 ");
+    //if (!data->condition.isEmpty())
+    //    cmd += "-c " + data->condition + " ";
+    cmd += where;
+#else
+    QString cmd = _("-break-insert -f ");
+    //if (!data->condition.isEmpty())
+    //    cmd += _("-c ") + data->condition + ' ';
+    cmd += where;
 #endif
     debugMessage(_("Current state: %1").arg(q->status()));
     postCommand(cmd, NeedsStop, CB(handleBreakInsert), index);
@@ -2039,24 +2033,22 @@ void GdbEngine::handleBreakInsert(const GdbResultRecord &record, const QVariant
         const BreakpointData *data = handler->at(index);
         // Note that it is perfectly correct that the file name is put
         // in quotes but not escaped. GDB simply is like that.
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
+#if defined(Q_OS_WIN)
+        QFileInfo fi(data->fileName);
+        QString where = _c('"') + fi.fileName() + _("\":")
+            + data->lineNumber;
+        //QString where = m_data->fileName + _c(':') + data->lineNumber;
+#elif defined(Q_OS_MAC)
+        QFileInfo fi(data->fileName);
+        QString where = _c('"') + fi.fileName() + _("\":")
+            + data->lineNumber;
+#else
         //QString where = "\"\\\"" + data->fileName + "\\\":"
         //    + data->lineNumber + "\"";
         QString where = _c('"') + data->fileName + _("\":")
             + data->lineNumber;
         // Should not happen with -break-insert -f. gdb older than 6.8?
         QTC_ASSERT(false, /**/);
-#endif
-#if defined(Q_OS_MAC)
-        QFileInfo fi(data->fileName);
-        QString where = _c('"') + fi.fileName() + _("\":")
-            + data->lineNumber;
-#endif
-#if defined(Q_OS_WIN)
-        QFileInfo fi(data->fileName);
-        QString where = _c('"') + fi.fileName() + _("\":")
-            + data->lineNumber;
-        //QString where = m_data->fileName + _c(':') + data->lineNumber;
 #endif
         postCommand(_("break ") + where, CB(handleBreakInsert1), index);
     }
diff --git a/src/plugins/debugger/stackwindow.cpp b/src/plugins/debugger/stackwindow.cpp
index e51c27ac6d3..9354dda8068 100644
--- a/src/plugins/debugger/stackwindow.cpp
+++ b/src/plugins/debugger/stackwindow.cpp
@@ -133,7 +133,7 @@ void StackWindow::copyContentsToClipboard()
         str += '\n';
     }
     QClipboard *clipboard = QApplication::clipboard();
-    #ifdef Q_OS_LINUX
+    #ifdef Q_WS_X11
     clipboard->setText(str, QClipboard::Selection);
     #endif
     clipboard->setText(str, QClipboard::Clipboard);
diff --git a/src/plugins/find/findtoolbar.cpp b/src/plugins/find/findtoolbar.cpp
index 313d229ceb8..2dff2fdc378 100644
--- a/src/plugins/find/findtoolbar.cpp
+++ b/src/plugins/find/findtoolbar.cpp
@@ -240,7 +240,7 @@ bool FindToolBar::eventFilter(QObject *obj, QEvent *event)
     if ((obj == m_ui.findEdit || obj == m_findCompleter->popup())
                && event->type() == QEvent::KeyPress) {
         QKeyEvent *ke = static_cast(event);
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
         if (ke->key() == Qt::Key_Space && (ke->modifiers() & Qt::MetaModifier)) {
 #else
         if (ke->key() == Qt::Key_Space && (ke->modifiers() & Qt::ControlModifier)) {
@@ -261,7 +261,7 @@ bool FindToolBar::eventFilter(QObject *obj, QEvent *event)
                 event->accept();
                 return true;
             }
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
         } else if (ke->key() == Qt::Key_Space && (ke->modifiers() & Qt::MetaModifier)) {
 #else
         } else if (ke->key() == Qt::Key_Space && (ke->modifiers() & Qt::ControlModifier)) {
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index 4f240a21fe8..ac3cfb2d2d8 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -279,7 +279,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
     m_diffAction = new Core::Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
     command = actionManager->registerAction(m_diffAction, "Git.Diff", globalcontext);
     command->setAttribute(Core::Command::CA_UpdateText);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+D")));
 #endif
     connect(m_diffAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
@@ -287,7 +287,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
 
     m_statusAction = new Core::Utils::ParameterAction(tr("File Status"), tr("Status Related to \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
     command = actionManager->registerAction(m_statusAction, "Git.Status", globalcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+S")));
 #endif
     command->setAttribute(Core::Command::CA_UpdateText);
@@ -296,7 +296,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
 
     m_logAction = new Core::Utils::ParameterAction(tr("Log File"), tr("Log of \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
     command = actionManager->registerAction(m_logAction, "Git.Log", globalcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+L")));
 #endif
     command->setAttribute(Core::Command::CA_UpdateText);
@@ -305,7 +305,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
 
     m_blameAction = new Core::Utils::ParameterAction(tr("Blame"), tr("Blame for \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
     command = actionManager->registerAction(m_blameAction, "Git.Blame", globalcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+B")));
 #endif
     command->setAttribute(Core::Command::CA_UpdateText);
@@ -314,7 +314,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
 
     m_undoFileAction = new Core::Utils::ParameterAction(tr("Undo Changes"), tr("Undo Changes for \"%1\""),  Core::Utils::ParameterAction::AlwaysEnabled, this);
     command = actionManager->registerAction(m_undoFileAction, "Git.Undo", globalcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+U")));
 #endif
     command->setAttribute(Core::Command::CA_UpdateText);
@@ -323,7 +323,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
 
     m_stageAction = new Core::Utils::ParameterAction(tr("Stage File for Commit"), tr("Stage \"%1\" for Commit"), Core::Utils::ParameterAction::AlwaysEnabled, this);
     command = actionManager->registerAction(m_stageAction, "Git.Stage", globalcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+A")));
 #endif
     command->setAttribute(Core::Command::CA_UpdateText);
@@ -346,7 +346,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
 
     m_diffProjectAction = new Core::Utils::ParameterAction(tr("Diff Current Project"), tr("Diff Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
     command = actionManager->registerAction(m_diffProjectAction, "Git.DiffProject", globalcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence("Alt+G,Alt+Shift+D"));
 #endif
     command->setAttribute(Core::Command::CA_UpdateText);
@@ -361,7 +361,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
 
     m_logProjectAction = new Core::Utils::ParameterAction(tr("Log Project"), tr("Log Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
     command = actionManager->registerAction(m_logProjectAction, "Git.LogProject", globalcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+K")));
 #endif
     command->setAttribute(Core::Command::CA_UpdateText);
@@ -398,7 +398,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
 
     m_commitAction = new QAction(tr("Commit..."), this);
     command = actionManager->registerAction(m_commitAction, "Git.Commit", globalcontext);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+C")));
 #endif
     command->setAttribute(Core::Command::CA_UpdateText);
diff --git a/src/plugins/help/centralwidget.cpp b/src/plugins/help/centralwidget.cpp
index a53a67564ac..72574102f91 100644
--- a/src/plugins/help/centralwidget.cpp
+++ b/src/plugins/help/centralwidget.cpp
@@ -85,10 +85,10 @@ CentralWidget::CentralWidget(QHelpEngine *engine, QWidget *parent)
     globalActionList.clear();
     collectionFile = helpEngine->collectionFile();
 
-    QString system = QLatin1String("win");
-
 #ifdef Q_OS_MAC
-    system = QLatin1String("mac");
+#   define SYSTEM "mac"
+#else
+#   define SYSTEM "win"
 #endif
 
     tabWidget = new QTabWidget;
@@ -100,7 +100,7 @@ CentralWidget::CentralWidget(QHelpEngine *engine, QWidget *parent)
     QToolButton *newTabButton = new QToolButton(this);
     newTabButton->setAutoRaise(true);
     newTabButton->setToolTip(tr("Add new page"));
-    newTabButton->setIcon(QIcon(QString::fromUtf8(":/trolltech/assistant/images/%1/addtab.png").arg(system)));
+    newTabButton->setIcon(QIcon(QString::fromLatin1(":/trolltech/assistant/images/" SYSTEM "/addtab.png")));
 
     tabWidget->setCornerWidget(newTabButton, Qt::TopLeftCorner);
     connect(newTabButton, SIGNAL(clicked()), this, SLOT(newTab()));
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp
index 661723464cb..f5287afbd6f 100644
--- a/src/plugins/help/helpplugin.cpp
+++ b/src/plugins/help/helpplugin.cpp
@@ -241,7 +241,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
     am->actionContainer(Core::Constants::M_HELP)->addAction(cmd,
         Core::Constants::G_HELP_HELP);
 
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     QAction *sep = new QAction(this);
     sep->setSeparator(true);
     cmd = am->registerAction(sep, QLatin1String("Help.Separator"), globalcontext);
@@ -344,7 +344,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
     actionList << previousAction
         << nextAction
         << homeAction
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
         << sep
 #endif
         << copyAction;
diff --git a/src/plugins/projectexplorer/debugginghelper.cpp b/src/plugins/projectexplorer/debugginghelper.cpp
index da5fefc5125..b403872f5b2 100644
--- a/src/plugins/projectexplorer/debugginghelper.cpp
+++ b/src/plugins/projectexplorer/debugginghelper.cpp
@@ -215,10 +215,11 @@ QStringList DebuggingHelperLibrary::possibleQMakeCommands()
     // On windows noone has renamed qmake, right?
 #ifdef Q_OS_WIN
     return QStringList() << "qmake.exe";
-#endif
+#else
     // On unix some distributions renamed qmake to avoid clashes
     QStringList result;
     result << "qmake-qt4" << "qmake4" << "qmake";
     return result;
+#endif
 }
 
diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp
index 32b6ca9edfb..8054fa0f8d6 100644
--- a/src/plugins/projectexplorer/projecttreewidget.cpp
+++ b/src/plugins/projectexplorer/projecttreewidget.cpp
@@ -90,7 +90,7 @@ protected:
             QTreeView::focusOutEvent(event);
     }
 
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     void keyPressEvent(QKeyEvent *event)
     {
         if ((event->key() == Qt::Key_Return
diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp
index 3b0049ec403..071d30a5ce3 100644
--- a/src/plugins/qt4projectmanager/qmakestep.cpp
+++ b/src/plugins/qt4projectmanager/qmakestep.cpp
@@ -103,7 +103,7 @@ bool QMakeStep::init(const QString &name)
 
 
     if (!qtVersion->isValid()) {
-#if defined(Q_OS_MAC)
+#if defined(Q_WS_MAC)
         emit addToOutputWindow(tr("\nNo valid Qt version set. Set one in Preferences \n"));
 #else
         emit addToOutputWindow(tr("\nNo valid Qt version set. Set one in Tools/Options \n"));
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp
index 761e70612fa..ea64f2da180 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.cpp
+++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp
@@ -937,8 +937,7 @@ static inline QStringList possibleGuiBinaries(const QString &name)
 {
 #ifdef Q_OS_WIN
     return QStringList(name + QLatin1String(".exe"));
-#endif
-#ifdef Q_OS_MAC // 'Foo.app/Contents/MacOS/Foo'
+#elif defined(Q_OS_MAC) // 'Foo.app/Contents/MacOS/Foo'
     QString upCaseName = name;
     upCaseName[0] = upCaseName.at(0).toUpper();
     QString macBinary = upCaseName;
diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp
index 532beecdf45..af0e674c1bc 100644
--- a/src/plugins/subversion/subversionplugin.cpp
+++ b/src/plugins/subversion/subversionplugin.cpp
@@ -336,7 +336,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
     command = ami->registerAction(m_addAction, SubversionPlugin::ADD,
         globalcontext);
     command->setAttribute(Core::Command::CA_UpdateText);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+A")));
 #endif
     connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
@@ -368,7 +368,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
     command = ami->registerAction(m_diffCurrentAction,
         SubversionPlugin::DIFF_CURRENT, globalcontext);
     command->setAttribute(Core::Command::CA_UpdateText);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+D")));
 #endif
     connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
@@ -386,7 +386,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
     command = ami->registerAction(m_commitCurrentAction,
         SubversionPlugin::COMMIT_CURRENT, globalcontext);
     command->setAttribute(Core::Command::CA_UpdateText);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+C")));
 #endif
     connect(m_commitCurrentAction, SIGNAL(triggered()), this, SLOT(startCommitCurrentFile()));
diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp
index 44ab1dab1fe..5448be6d4a3 100644
--- a/src/plugins/texteditor/basetexteditor.cpp
+++ b/src/plugins/texteditor/basetexteditor.cpp
@@ -956,7 +956,7 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e)
     case Qt::Key_End:
     case Qt::Key_Right:
     case Qt::Key_Left:
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
         if ((e->modifiers() & (Qt::AltModifier | Qt::ShiftModifier)) == (Qt::AltModifier | Qt::ShiftModifier)) {
 
             d->m_lastEventWasBlockSelectionEvent = true;
diff --git a/src/plugins/texteditor/completionwidget.cpp b/src/plugins/texteditor/completionwidget.cpp
index 8806fd3d6d5..a7d0c231297 100644
--- a/src/plugins/texteditor/completionwidget.cpp
+++ b/src/plugins/texteditor/completionwidget.cpp
@@ -255,7 +255,7 @@ void CompletionWidget::updatePositionAndSize(int startPos)
     // Determine the position, keeping the popup on the screen
     const QRect cursorRect = m_editor->cursorRect(startPos);
     const QDesktopWidget *desktop = QApplication::desktop();
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     const QRect screen = desktop->availableGeometry(desktop->screenNumber(m_editorWidget));
 #else
     const QRect screen = desktop->screenGeometry(desktop->screenNumber(m_editorWidget));
diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp
index 37907a345e5..441a7a67113 100644
--- a/src/plugins/texteditor/fontsettings.cpp
+++ b/src/plugins/texteditor/fontsettings.cpp
@@ -48,7 +48,7 @@ static const bool DEFAULT_ANTIALIAS = true;
     enum { DEFAULT_FONT_SIZE = 12 };
     static const char *DEFAULT_FONT_FAMILY = "Monaco";
 #else
-#ifdef Q_OS_UNIX
+#ifdef Q_WS_X11
     enum { DEFAULT_FONT_SIZE = 9 };
     static const char *DEFAULT_FONT_FAMILY = "Monospace";
 #else
diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp
index 44220bfdb99..d8bd9e098e4 100644
--- a/src/plugins/texteditor/texteditoractionhandler.cpp
+++ b/src/plugins/texteditor/texteditoractionhandler.cpp
@@ -146,7 +146,7 @@ void TextEditorActionHandler::createActions()
     m_visualizeWhitespaceAction->setCheckable(true);
     command = am->registerAction(m_visualizeWhitespaceAction,
                                  TextEditor::Constants::VISUALIZE_WHITESPACE, m_contextId);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Ctrl+E, Ctrl+V")));
 #endif
     advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT);
@@ -162,7 +162,7 @@ void TextEditorActionHandler::createActions()
     m_textWrappingAction = new QAction(tr("Enable Text &Wrapping"), this);
     m_textWrappingAction->setCheckable(true);
     command = am->registerAction(m_textWrappingAction, TextEditor::Constants::TEXT_WRAPPING, m_contextId);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Ctrl+E, Ctrl+W")));
 #endif
     advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT);
diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp
index 049d3a39780..b6bf55025bf 100644
--- a/src/plugins/texteditor/texteditorplugin.cpp
+++ b/src/plugins/texteditor/texteditorplugin.cpp
@@ -124,7 +124,7 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe
     // Make sure the shortcut still works when the completion widget is active
     completionShortcut->setContext(Qt::ApplicationShortcut);
     Core::Command *command = am->registerShortcut(completionShortcut, Constants::COMPLETE_THIS, context);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
     command->setDefaultKeySequence(QKeySequence(tr("Ctrl+Space")));
 #else
     command->setDefaultKeySequence(QKeySequence(tr("Meta+Space")));
diff --git a/src/shared/help/bookmarkmanager.cpp b/src/shared/help/bookmarkmanager.cpp
index 7052495fcef..96c86437657 100644
--- a/src/shared/help/bookmarkmanager.cpp
+++ b/src/shared/help/bookmarkmanager.cpp
@@ -436,9 +436,10 @@ void BookmarkWidget::setup(bool showButtons)
     treeView = new TreeView(this);
     vlayout->addWidget(treeView);
 
-    QString system = QLatin1String("win");
 #ifdef Q_OS_MAC
-    system = QLatin1String("mac");
+#   define SYSTEM "mac"
+#else
+#   define SYSTEM "win"
 #endif
 
     if (showButtons) {
@@ -449,8 +450,8 @@ void BookmarkWidget::setup(bool showButtons)
 
         addButton = new QToolButton(this);
         addButton->setText(tr("Add"));
-        addButton->setIcon(QIcon(QString::fromUtf8(
-            ":/trolltech/assistant/images/%1/addtab.png").arg(system)));
+        addButton->setIcon(QIcon(QString::fromLatin1(
+            ":/trolltech/assistant/images/" SYSTEM "/addtab.png")));
         addButton->setAutoRaise(true);
         addButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
         hlayout->addWidget(addButton);
@@ -458,8 +459,8 @@ void BookmarkWidget::setup(bool showButtons)
 
         removeButton = new QToolButton(this);
         removeButton->setText(tr("Remove"));
-        removeButton->setIcon(QIcon(QString::fromUtf8(
-            ":/trolltech/assistant/images/%1/closetab.png").arg(system)));
+        removeButton->setIcon(QIcon(QString::fromLatin1(
+            ":/trolltech/assistant/images/" SYSTEM "/closetab.png")));
         removeButton->setAutoRaise(true);
         removeButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
         hlayout->addWidget(removeButton);
diff --git a/src/shared/help/indexwindow.cpp b/src/shared/help/indexwindow.cpp
index 1b79ed00ae8..8ae9f4e0a93 100644
--- a/src/shared/help/indexwindow.cpp
+++ b/src/shared/help/indexwindow.cpp
@@ -140,7 +140,7 @@ bool IndexWindow::eventFilter(QObject *obj, QEvent *e)
             }
         }
     }
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     else if (obj == m_indexWidget && e->type() == QEvent::KeyPress) {
         QKeyEvent *ke = static_cast(e);
         if (ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter)
diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp
index 0a352e2b0b2..6f6d6c7bbc3 100644
--- a/src/shared/proparser/profileevaluator.cpp
+++ b/src/shared/proparser/profileevaluator.cpp
@@ -48,7 +48,7 @@
 #ifdef Q_OS_UNIX
 #include 
 #include 
-#elif defined(Q_OS_WIN32)
+#else
 #include 
 #endif
 #include 
diff --git a/src/shared/qtlockedfile/qtlockedfile.h b/src/shared/qtlockedfile/qtlockedfile.h
index b4a5cbd0637..49e26735dc6 100644
--- a/src/shared/qtlockedfile/qtlockedfile.h
+++ b/src/shared/qtlockedfile/qtlockedfile.h
@@ -32,7 +32,7 @@
 
 #include 
 
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_WIN)
 #  if !defined(QT_QTLOCKEDFILE_EXPORT) && !defined(QT_QTLOCKEDFILE_IMPORT)
 #    define QT_QTLOCKEDFILE_EXPORT
 #  elif defined(QT_QTLOCKEDFILE_IMPORT)

From 259197a500cab562e79c758a17f372027a74be73 Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen 
Date: Wed, 3 Jun 2009 20:54:40 +0200
Subject: [PATCH 22/25] clean up OS conditionals in project files

---
 doc/doc.pri                           |  2 --
 src/app/app.pro                       | 25 +++++++++----------------
 src/plugins/coreplugin/coreplugin.pro |  4 +++-
 src/qtcreatorlibrary.pri              |  2 +-
 src/qtcreatorplugin.pri               |  2 +-
 5 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/doc/doc.pri b/doc/doc.pri
index 67428a03892..98c6652a4b9 100644
--- a/doc/doc.pri
+++ b/doc/doc.pri
@@ -23,9 +23,7 @@ qch_docs.files = $$QCH_FILE
 
 unix:!macx {
     system("mkdir -p `dirname $$QCH_FILE` && touch $$QCH_FILE")
-}
 
-unix:!macx {
     qch_docs.path = /share/doc/qtcreator
     INSTALLS += qch_docs
 }
diff --git a/src/app/app.pro b/src/app/app.pro
index 3bb47607f0e..4f29e1f263c 100644
--- a/src/app/app.pro
+++ b/src/app/app.pro
@@ -5,29 +5,22 @@ TEMPLATE = app
 TARGET = $$IDE_APP_TARGET
 DESTDIR = $$IDE_APP_PATH
 
-
 SOURCES += main.cpp
 
 include(../rpath.pri)
 
-win32 {
-        RC_FILE = qtcreator.rc
-}
-
-macx {
-        ICON = qtcreator.icns
-        QMAKE_INFO_PLIST = Info.plist
-}
-
-macx {
-    CONFIG(debug, debug|release):LIBS *= -lExtensionSystem_debug -lAggregation_debug
-    else:LIBS *= -lExtensionSystem -lAggregation
-}
 win32 {
     CONFIG(debug, debug|release):LIBS *= -lExtensionSystemd -lAggregationd
     else:LIBS *= -lExtensionSystem -lAggregation
-}
-unix:!macx {
+
+    RC_FILE = qtcreator.rc
+} else:macx {
+    CONFIG(debug, debug|release):LIBS *= -lExtensionSystem_debug -lAggregation_debug
+    else:LIBS *= -lExtensionSystem -lAggregation
+
+    ICON = qtcreator.icns
+    QMAKE_INFO_PLIST = Info.plist
+} else {
     LIBS *= -lExtensionSystem -lAggregation
 
     target.path  = /bin
diff --git a/src/plugins/coreplugin/coreplugin.pro b/src/plugins/coreplugin/coreplugin.pro
index f36875126c0..0b9d77bf23b 100644
--- a/src/plugins/coreplugin/coreplugin.pro
+++ b/src/plugins/coreplugin/coreplugin.pro
@@ -170,9 +170,11 @@ FORMS += dialogs/newdialog.ui \
     welcomemode.ui
 RESOURCES += core.qrc \
     fancyactionbar.qrc
-linux-* { 
+
+unix:!macx {
     images.files = images/qtcreator_logo_*.png
     images.path = /share/pixmaps
     INSTALLS += images
 }
+
 OTHER_FILES += Core.pluginspec
diff --git a/src/qtcreatorlibrary.pri b/src/qtcreatorlibrary.pri
index fb92b5202a8..ecfee84d112 100644
--- a/src/qtcreatorlibrary.pri
+++ b/src/qtcreatorlibrary.pri
@@ -12,7 +12,7 @@ TARGET = $$qtLibraryTarget($$TARGET)
 
 contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
 
-linux-* {
+unix:!macx {
 	target.path = /$$IDE_LIBRARY_BASENAME/qtcreator
 	INSTALLS += target
 }
diff --git a/src/qtcreatorplugin.pri b/src/qtcreatorplugin.pri
index cb3e57f4e89..dcb4649e99e 100644
--- a/src/qtcreatorplugin.pri
+++ b/src/qtcreatorplugin.pri
@@ -42,7 +42,7 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
 
 CONFIG += plugin plugin_with_soname
 
-linux-* {
+unix:!macx {
     target.path = /$$IDE_LIBRARY_BASENAME/qtcreator/plugins/$$PROVIDER
     pluginspec.files += $${TARGET}.pluginspec
     pluginspec.path = /$$IDE_LIBRARY_BASENAME/qtcreator/plugins/$$PROVIDER

From 3104e4c121f3209890823db69a7c09d644b90951 Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen 
Date: Thu, 4 Jun 2009 09:49:23 +0200
Subject: [PATCH 23/25] fix gcc 3.3. build

the templated friend just doesn't have any effect.
so simply skip the typeinfo. will be slower, but you deserve that if you
use that compiler.
---
 src/shared/proparser/profileevaluator.cpp | 2 ++
 src/shared/proparser/profileevaluator.h   | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp
index 6f6d6c7bbc3..47c9b93b336 100644
--- a/src/shared/proparser/profileevaluator.cpp
+++ b/src/shared/proparser/profileevaluator.cpp
@@ -248,8 +248,10 @@ public:
     bool m_parsePreAndPostFiles;
 };
 
+#if !defined(__GNUC__) || __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3)
 Q_DECLARE_TYPEINFO(ProFileEvaluator::Private::State, Q_PRIMITIVE_TYPE);
 Q_DECLARE_TYPEINFO(ProFileEvaluator::Private::ProLoop, Q_MOVABLE_TYPE);
+#endif
 
 ProFileEvaluator::Private::Private(ProFileEvaluator *q_)
   : q(q_)
diff --git a/src/shared/proparser/profileevaluator.h b/src/shared/proparser/profileevaluator.h
index de4b07f41d0..cb3a4880331 100644
--- a/src/shared/proparser/profileevaluator.h
+++ b/src/shared/proparser/profileevaluator.h
@@ -88,6 +88,7 @@ private:
     class Private;
     Private *d;
 
+    // This doesn't help gcc 3.3 ...
     template friend class QTypeInfo;
 };
 

From b184c8c3472bdfaf5cc9f27d73f2cbc791caa274 Mon Sep 17 00:00:00 2001
From: Kavindra Devi Palaraja 
Date: Wed, 3 Jun 2009 14:24:12 +0200
Subject: [PATCH 24/25] Fixes:    Doc - finishing part 2, yay ;)

RevBy:    TrustMe
---
 doc/addressbook-sdk.qdoc                      |  53 ++++++++++++++++++
 .../addressbook-sdk/part2/addressbook.cpp     |  51 ++++++++++++++++-
 .../addressbook-sdk/part2/addressbook.h       |   2 +
 ...dressbook-tutorial-part2-add-flowchart.png | Bin 0 -> 23533 bytes
 4 files changed, 104 insertions(+), 2 deletions(-)
 create mode 100644 doc/images/addressbook-tutorial-part2-add-flowchart.png

diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc
index 3d97237e570..643f6d0b7e4 100644
--- a/doc/addressbook-sdk.qdoc
+++ b/doc/addressbook-sdk.qdoc
@@ -364,4 +364,57 @@
     \c submitButton and \c cancelButton; but we disable \c addButton.
 
     \snippet examples/addressbook-sdk/part2/addressbook.cpp addContact
+
+    \section2 The \c{submitContact()} Function
+
+    This function can be divided into three parts:
+
+    \list 1
+        \o  We extract the contact's detail from \c nameLine and \c addressText
+            and store them in QString objects. We also validate to ensure that
+            the user did not click \gui Submit with empty input fields;
+            otherwise, a QMessageBox is displayed to remind the user for a name
+            and address.
+
+            \snippet examples/addressbook-sdk/part2/addressbook.cpp submitContact part1
+
+        \o  We then proceed to check if the contact already exists. If it does
+            not exist, we add the contact to \c contacts and we display a
+            QMessageBox to inform the user about this, preventing the user from
+            adding duplicate contacts. Our \c contacts object is based on
+            key-value pairs or name and address, hence, we want to ensure that
+            \e key is unique.
+
+            \snippet examples/addressbook-sdk/part2/addressbook.cpp submitContact part2
+
+        \o  Once we have handled both cases mentioned above, we restore the
+            push buttons to their normal state with the following code:
+
+            \snippet examples/addressbook-sdk/part2/addressbook.cpp submitContact part3
+    \endlist
+
+    The screenshot below shows the QMessageBox object we use to display
+    information messages to the user.
+
+    # image
+
+    \section2 The \c{cancel()} Function
+
+    This function restores the last displayed contact details and enables
+    \c addButton, as well as hides \c submitButton and \c cancelButton.
+
+    \snippet examples/addressbook-sdk/part2/addressbook.cpp cancel
+
+    The general idea behind adding a contact is to give the user the
+    flexibility to click \gui Submit or \gui Cancel at any time. The flowchart
+    below further explains this concept:
+
+    \image addressbook-tutorial-part2-add-flowchart.png
+
+
+    \section1 Running the Application
+
+    Run your application now. You will be able to add as many unique contacts
+    as you like.
+
 */
diff --git a/doc/examples/addressbook-sdk/part2/addressbook.cpp b/doc/examples/addressbook-sdk/part2/addressbook.cpp
index 1406c3ca72b..06bb6327d5a 100644
--- a/doc/examples/addressbook-sdk/part2/addressbook.cpp
+++ b/doc/examples/addressbook-sdk/part2/addressbook.cpp
@@ -50,7 +50,7 @@ AddressBook::~AddressBook()
 void AddressBook::addContact()
 {
     oldName = nameLine->text();
-    oldAddress = addressTExt->toPlainText();
+    oldAddress = addressText->toPlainText();
 
     nameLine->clear();
     addressText->clear();
@@ -65,10 +65,57 @@ void AddressBook::addContact()
 }
 //! [addContact]
 
+//! [submitContact part1]
 void AddressBook::submitContact()
 {
-}
+    QString name = nameLine->text();
+    QString address = addressText->toPlainText();
 
+    if (name == "" || address == "") {
+        QMessageBox::information(this, tr("Empty Field"),
+            tr("Please enter a name and address."));
+        return;
+    }
+//! [submitContact part1]
+
+//! [submitContact part2]
+    if (!contacts.contains(name)) {
+        contacts.insert(name, address);
+        QMessageBox::information(this, tr("Add Successful"),
+            tr("\"%1\" has been added to your address book.").arg(name));
+        return;
+    } else {
+        QMessageBox::information(this, tr("Add Unsuccessful"),
+            tr("Sorry, \"%1\" is already in your address book.").arg(name));
+        return;
+    }
+//! [submitContact part2]
+
+//! [submitContact part3]
+    if (contacts.isEmpty()) {
+        nameLine->clear();
+        addressText->clear();
+    }
+
+    nameLine->setReadOnly(true);
+    addressText->setReadOnly(true);
+    addButton->setEnabled(true);
+    submitButton->hide();
+    cancelButton->hide();
+}
+//! [submitContact part3]
+
+//! [cancel]
 void AddressBook::cancel()
 {
+    nameLine->setText(oldName);
+    nameLine->setReadOnly(true);
+
+    addressText->setText(oldAddress);
+    addressText->setReadOnly(true);
+
+    addButton->setEnabled(true);
+    submitButton->hide();
+    cancelButton->hide();
 }
+//! [cancel]
diff --git a/doc/examples/addressbook-sdk/part2/addressbook.h b/doc/examples/addressbook-sdk/part2/addressbook.h
index 3021d5b9b09..86cf5b07bd8 100644
--- a/doc/examples/addressbook-sdk/part2/addressbook.h
+++ b/doc/examples/addressbook-sdk/part2/addressbook.h
@@ -6,6 +6,8 @@
 #include 
 #include 
 #include 
+#include 
+
 
 namespace Ui
 {
diff --git a/doc/images/addressbook-tutorial-part2-add-flowchart.png b/doc/images/addressbook-tutorial-part2-add-flowchart.png
new file mode 100644
index 0000000000000000000000000000000000000000..ca9af3720d45f9be8806504b04c82a212e9df6ab
GIT binary patch
literal 23533
zcmeAS@N?(olHy`uVBq!ia0y~yV0y~Hz_gZwje&uo!BF5o14Hx{PZ!6Kid%2))~-=~
z+Iauxui~X=*NC3p)Vjw)M@2Vcvzy%M4b0)+Q)fry=BW7ze4ORkws7|C^=c_={q|U&
zJ0&}N9^0J@aw2O@CZD^Z)KJ-(X&C3)nX^pLASe6Ivg5h454v5D;5V#0`pqEueEj)&
zR?n|k`d?kSD){-m;`g@t^Vfd~p1E)YXECjc*>CW^RT+-G9|DU
zW9`TF-_Oik$zjP3GQn8=iTFHQ>#2&*85n~28YcL6%wT44IK}9*cEbMWJD;a19gzWX
zCln>|F(^D`FxWLA{_orT{u$MWt&9G1om%%{-o)ECb}UJ@DtR$MUXP(+3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+LK9!mm-cM`)J+!@jxIJ&D>Ym^8Hk&@qGPrkrxjHnk<(}qPY_NUF{c(C;X75gy
zQMce0#NKWa{h1N-(X09}EJ$2~?9LsJ
zzjniI*Dkx$*E_+5+=i_|b)Urd&$wIj`F`tnwf{;o(T_j!|J%Jf`udAk1s`VbpYir}
z2nV>-!dutQ|M_~q*hxqd2CZ)ZwI)F{XdH-v0knJ#6f4i%Pk~NfP}&JH|8-T46
Date: Wed, 3 Jun 2009 17:00:30 +0200
Subject: [PATCH 25/25] Fixes:    Doc - starting on modifying Part 3

RevBy:    TrustMe
---
 doc/addressbook-sdk.qdoc                      |  32 +++++
 .../addressbook-sdk/part3/addressbook.cpp     | 121 ++++++++++++++++++
 .../addressbook-sdk/part3/addressbook.h       |  51 ++++++++
 .../addressbook-sdk/part3/addressbook.ui      |  93 ++++++++++++++
 doc/examples/addressbook-sdk/part3/main.cpp   |  12 ++
 doc/examples/addressbook-sdk/part3/part3.pro  |  16 +++
 .../addressbook-tutorial-part3-linkedlist.png | Bin 0 -> 10209 bytes
 7 files changed, 325 insertions(+)
 create mode 100644 doc/examples/addressbook-sdk/part3/addressbook.cpp
 create mode 100644 doc/examples/addressbook-sdk/part3/addressbook.h
 create mode 100644 doc/examples/addressbook-sdk/part3/addressbook.ui
 create mode 100644 doc/examples/addressbook-sdk/part3/main.cpp
 create mode 100644 doc/examples/addressbook-sdk/part3/part3.pro
 create mode 100644 doc/images/addressbook-tutorial-part3-linkedlist.png

diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc
index 643f6d0b7e4..7514052c0e7 100644
--- a/doc/addressbook-sdk.qdoc
+++ b/doc/addressbook-sdk.qdoc
@@ -418,3 +418,35 @@
     as you like.
 
 */
+
+
+/*!
+    \page tutorials-addressbook-sdk-part3.html
+    \previouspage Address Book 2 - Adding Addresses
+    \contentspage {Address Book Tutorial}{Contents}
+    \nextpage \l{examples/addressbook-sdk/part4}{Chapter 4}
+    \example examples/addressbook-sdk/part3
+    \title Address Book 3 - Navigating between Entries}
+
+    The address book application is now half complete. We need to add some
+    functions to navigate between contacts. But first, we have to decide what
+    sort of a data structure we would like to use to hold these contacts.
+
+    In Chapter 2, we used a QMap of key-value pairs with the contact's name as
+    the \e key, and the contact's address as the \e value. This works well for
+    our case. However, in order to navigate and display each entry, a little
+    bit of enhancement is needed.
+
+    We enhance the QMap by making it replicate a data structure similar to a
+    circularly-linked list, where all elements are connected, including the
+    first element and the last element. The figure below illustrates this data
+    structure;
+
+    \image addressbook-tutorial-part3-linkedlist.png
+
+
+    \section1 Placing Widgets on the Form
+
+    \section1 The AddressBook Class
+
+*/
diff --git a/doc/examples/addressbook-sdk/part3/addressbook.cpp b/doc/examples/addressbook-sdk/part3/addressbook.cpp
new file mode 100644
index 00000000000..06bb6327d5a
--- /dev/null
+++ b/doc/examples/addressbook-sdk/part3/addressbook.cpp
@@ -0,0 +1,121 @@
+#include "addressbook.h"
+#include "ui_addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+    : QWidget(parent), ui(new Ui::AddressBookClass)
+{
+    ui->setupUi(this);
+
+    //! [extract objects]
+    nameLine = new QLineEdit;
+    nameLine = ui->nameLine;
+    nameLine->setReadOnly(true);
+
+    addressText = new QTextEdit;
+    addressText = ui->addressText;
+    addressText->setReadOnly(true);
+
+    addButton = new QPushButton;
+    addButton = ui->addButton;
+
+    submitButton = new QPushButton;
+    submitButton = ui->submitButton;
+    submitButton->hide();
+
+    cancelButton = new QPushButton;
+    cancelButton = ui->cancelButton;
+    cancelButton->hide();
+    //! [extract objects]
+
+    //! [signal slot]
+    connect(addButton, SIGNAL(clicked()), this,
+                SLOT(addContact()));
+    connect(submitButton, SIGNAL(clicked()), this,
+                SLOT(submitContact()));
+    connect(cancelButton, SIGNAL(clicked()), this,
+                SLOT(cancel()));
+    //! [signal slot]
+
+    //! [window title]
+    setWindowTitle(tr("Simple Address Book"));
+    //! [window title]
+}
+
+AddressBook::~AddressBook()
+{
+    delete ui;
+}
+
+//! [addContact]
+void AddressBook::addContact()
+{
+    oldName = nameLine->text();
+    oldAddress = addressText->toPlainText();
+
+    nameLine->clear();
+    addressText->clear();
+
+    nameLine->setReadOnly(false);
+    nameLine->setFocus(Qt::OtherFocusReason);
+    addressText->setReadOnly(false);
+
+    addButton->setEnabled(false);
+    submitButton->show();
+    cancelButton->show();
+}
+//! [addContact]
+
+//! [submitContact part1]
+void AddressBook::submitContact()
+{
+    QString name = nameLine->text();
+    QString address = addressText->toPlainText();
+
+    if (name == "" || address == "") {
+        QMessageBox::information(this, tr("Empty Field"),
+            tr("Please enter a name and address."));
+        return;
+    }
+//! [submitContact part1]
+
+//! [submitContact part2]
+    if (!contacts.contains(name)) {
+        contacts.insert(name, address);
+        QMessageBox::information(this, tr("Add Successful"),
+            tr("\"%1\" has been added to your address book.").arg(name));
+        return;
+    } else {
+        QMessageBox::information(this, tr("Add Unsuccessful"),
+            tr("Sorry, \"%1\" is already in your address book.").arg(name));
+        return;
+    }
+//! [submitContact part2]
+
+//! [submitContact part3]
+    if (contacts.isEmpty()) {
+        nameLine->clear();
+        addressText->clear();
+    }
+
+    nameLine->setReadOnly(true);
+    addressText->setReadOnly(true);
+    addButton->setEnabled(true);
+    submitButton->hide();
+    cancelButton->hide();
+}
+//! [submitContact part3]
+
+//! [cancel]
+void AddressBook::cancel()
+{
+    nameLine->setText(oldName);
+    nameLine->setReadOnly(true);
+
+    addressText->setText(oldAddress);
+    addressText->setReadOnly(true);
+
+    addButton->setEnabled(true);
+    submitButton->hide();
+    cancelButton->hide();
+}
+//! [cancel]
diff --git a/doc/examples/addressbook-sdk/part3/addressbook.h b/doc/examples/addressbook-sdk/part3/addressbook.h
new file mode 100644
index 00000000000..86cf5b07bd8
--- /dev/null
+++ b/doc/examples/addressbook-sdk/part3/addressbook.h
@@ -0,0 +1,51 @@
+//! [class definition]
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+
+namespace Ui
+{
+    class AddressBookClass;
+}
+
+class AddressBook : public QWidget
+{
+    Q_OBJECT
+
+public:
+    AddressBook(QWidget *parent = 0);
+    ~AddressBook();
+
+//! [slot definition]
+public slots:
+    void addContact();
+    void submitContact();
+    void cancel();
+//! [slot definition]
+
+private:
+    Ui::AddressBookClass *ui;
+
+//! [members1]
+    QPushButton *addButton;
+    QPushButton *submitButton;
+    QPushButton *cancelButton;
+    QLineEdit *nameLine;
+    QTextEdit *addressText;
+//! [members1]
+
+//! [members2]
+    QMap contacts;
+    QString oldName;
+    QString oldAddress;
+//! [members2]
+};
+
+#endif // ADDRESSBOOK_H
+//! [class definition]
diff --git a/doc/examples/addressbook-sdk/part3/addressbook.ui b/doc/examples/addressbook-sdk/part3/addressbook.ui
new file mode 100644
index 00000000000..493d546fc92
--- /dev/null
+++ b/doc/examples/addressbook-sdk/part3/addressbook.ui
@@ -0,0 +1,93 @@
+
+
+ addressbook
+ 
+  
+   
+    0
+    0
+    505
+    326
+   
+  
+  
+   addressbook
+  
+  
+   
+    
+     10
+     20
+     413
+     225
+    
+   
+   
+    
+     
+      
+       Name:
+      
+     
+    
+    
+     
+    
+    
+     
+      
+       Address:
+      
+      
+       Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+      
+     
+    
+    
+     
+    
+    
+     
+      
+       
+        
+         Add
+        
+       
+      
+      
+       
+        
+         Submit
+        
+       
+      
+      
+       
+        
+         Cancel
+        
+       
+      
+      
+       
+        
+         Qt::Vertical
+        
+        
+         
+          20
+          40
+         
+        
+       
+      
+     
+    
+   
+  
+ 
+ 
+ 
+ 
+
diff --git a/doc/examples/addressbook-sdk/part3/main.cpp b/doc/examples/addressbook-sdk/part3/main.cpp
new file mode 100644
index 00000000000..3378b4adce4
--- /dev/null
+++ b/doc/examples/addressbook-sdk/part3/main.cpp
@@ -0,0 +1,12 @@
+//! [main function]
+#include 
+#include "addressbook.h"
+
+int main(int argc, char *argv[])
+{
+    QApplication a(argc, argv);
+    AddressBook w;
+    w.show();
+    return a.exec();
+}
+//! [main function]
diff --git a/doc/examples/addressbook-sdk/part3/part3.pro b/doc/examples/addressbook-sdk/part3/part3.pro
new file mode 100644
index 00000000000..0bfd2f9e314
--- /dev/null
+++ b/doc/examples/addressbook-sdk/part3/part3.pro
@@ -0,0 +1,16 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2009-06-03T16:54:49
+#
+#-------------------------------------------------
+
+TARGET = part3
+TEMPLATE = app
+
+
+SOURCES += main.cpp\
+        addressbook.cpp
+
+HEADERS  += addressbook.h
+
+FORMS    += addressbook.ui
diff --git a/doc/images/addressbook-tutorial-part3-linkedlist.png b/doc/images/addressbook-tutorial-part3-linkedlist.png
new file mode 100644
index 0000000000000000000000000000000000000000..e7f4725dceb7b9f602d55019e2d39c846d02b859
GIT binary patch
literal 10209
zcmeAS@N?(olHy`uVBq!ia0y~yV0_NNz>v(r#=yX^F#3cZ1B3bsPZ!6Kinup-vjarJ
zZ?S)P9Y4f@%favw@0=Ab0xXQJjXUSPm1LhK@j1~srrK{_
zeCTxx|M{7_`knv3w7YEU!om13@9eBO?#q3>|JqMD@$&NYsV^^=`?ti)wg@=Ms3dHR
zXt_J@3U5##ON(}kfRn^ICjo{BOe#t&;tc{$9EUAyG#L_@cCKJLB<{qa$dfM0pd;e+
zZr|_okN?y;etZA_FXIl+YwP}IeR#e8{odT?=a%!Oq^p-7sP7bLb^77Nq1f{9OkKf}
zn|JP{eyXZ9iP-I_7yoV3vSohW<>nLSZ+RWjFJ_xNIv%Vo
z{rPjTbpBq`ebNp;C0`$`6<8@}{vGOw~Bz(2`)bV%H?YGM5
z=eEoU4oZqOi$4F!R>a|=+Ef;KQ(oS;Uf$lzjcO_;eLgicZ(DYF>74V=+vm(#IQ{bF
z$FU!n)z}_#E4B!ms1p&J`D>)*54^Ld4pA{t&~Z2o<>{CU{9S*F`qf8E&d
z@bi-JxSNKH)}GC5n!w1sXqS0z)vpgdl99Sq4ZAb*-rX*rHdWTYX~Ghf*~JH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