diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc
index 35707cea21e940dcdcf6dedaee691948ad95824c..8b74932214f4eabdac1b7506e3c92a7c43312456 100644
--- a/doc/qtcreator.qdoc
+++ b/doc/qtcreator.qdoc
@@ -1436,32 +1436,31 @@
 
     \title Handling External Libraries
 
-    Knowing external libraries is not only important for the
-    underlying build system, but also for Qt Creator itself.
-    This way, it can support code completion and syntax highlighting 
-    for external libraries as if they were part of the current 
-    project or the Qt library.
-
-    The way to add a library to the project depends on the 
-    project type, which influcences the build system used. 
-    The following sections describe the the procedure required
-    for each project type.
+    The ability to recognize external libraries is not only important for the
+    underlying buidl system, but also for Qt Creator itself. This ability
+    allows Qt Creator to support code completion and syntax highlighting for
+    external libraries as if they were part of the current project or the Qt
+    library.
+
+    The procedure of adding a library to a project, depends on the type of
+    project, which influences the build system used. The following sections
+    describe the the procedure required for each project type.
     
+
     \section1 QMake Projects (the default)
 
-    Open your your (ending in \c{.pro}) file from the 
-    \gui{Projects} pane, which will now show up in the editor.
-    Follow the description in the
+    Open your project file (\c{.pro}) from the \gui{Projects} pane. Then,
+    follow the guidelines in the
     \l{http://doc.qtsoftware.com/latest/make-project-files.html#declaring-other-libraries}
     {Declaring other Libraries} section of the Qt documentation.
 
-    If your project does sucessfully build and link against
-    the external library, syntax completion and highlighting
-    should also work.
+    If your project successfully builds and links against the external library,
+    syntax completion and highlighting should also work.
     
+
     \section1 CMake Projects
 
-    In CMake, libaries are usually detected using the \c{FIND_PACKAGE()} macro.
+    In CMake, libraries are usually detected using the \c{FIND_PACKAGE()} macro.
     A couple of them are already being shipped with CMake, they can be found in
     the \c{Modules} directory of your CMake installation. If you provide 
     libraries on your own, you will need to provide your own \c{FindFoo.cmake}
diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp
index c362c6fcf53dd6e46f3b85ab03af4589397870e7..bb6b6bebf8fcb27ee1a160765756efb30157b251 100644
--- a/src/libs/cplusplus/pp-engine.cpp
+++ b/src/libs/cplusplus/pp-engine.cpp
@@ -581,7 +581,8 @@ QByteArray Preprocessor::expand(const QByteArray &source)
 
 void Preprocessor::expand(const QByteArray &source, QByteArray *result)
 {
-    _expand(source, result);
+    if (result)
+        _expand(source, result);
 }
 
 void Preprocessor::expand(const char *first, const char *last, QByteArray *result)
diff --git a/src/plugins/coreplugin/welcomemode.cpp b/src/plugins/coreplugin/welcomemode.cpp
index a03241d2dbc0414753fa0b99939e9d7881ba2f0e..0bde9292018832778db8942b0697b46025bc15ba 100644
--- a/src/plugins/coreplugin/welcomemode.cpp
+++ b/src/plugins/coreplugin/welcomemode.cpp
@@ -62,6 +62,7 @@ struct WelcomeModePrivate
     Ui::WelcomePage ui;
     RSSFetcher *rssFetcher;
     WelcomeMode::WelcomePageData lastData;
+    int currentTip;
 };
 
 WelcomeModePrivate::WelcomeModePrivate()
@@ -104,8 +105,7 @@ WelcomeMode::WelcomeMode() :
     l->setMargin(0);
     l->setSpacing(0);
     l->addWidget(new QToolBar(m_d->m_widget));
-    // limit to 7 items to avoid scrollbars
-    m_d->rssFetcher = new RSSFetcher(7, this);
+    m_d->rssFetcher = new RSSFetcher(8, this);
     m_d->m_welcomePage = new QWidget(m_d->m_widget);
     m_d->ui.setupUi(m_d->m_welcomePage);
     m_d->ui.sessTreeWidget->viewport()->setAutoFillBackground(false);
@@ -156,7 +156,18 @@ WelcomeMode::WelcomeMode() :
     m_d->ui.tutorialTreeWidget->addItem(tr("Writing test cases"),
                                         QLatin1String("qthelp://com.trolltech.qt/qdoc/qtestlib-tutorial.html"));
 
-    m_d->ui.didYouKnowTextBrowser->setText(getTipOfTheDay());
+    srand(QDateTime::currentDateTime().toTime_t());
+    QStringList tips = tipsOfTheDay();
+    m_d->currentTip = rand()%tips.count();
+
+    QTextDocument *doc = m_d->ui.didYouKnowTextBrowser->document();
+    doc->setDefaultStyleSheet("a:link {color:black;}");
+    m_d->ui.didYouKnowTextBrowser->setDocument(doc);
+    m_d->ui.didYouKnowTextBrowser->setText(tips.at(m_d->currentTip));
+
+    connect(m_d->ui.nextTipBtn, SIGNAL(clicked()), this, SLOT(slotNextTip()));
+    connect(m_d->ui.prevTipBtn, SIGNAL(clicked()), this, SLOT(slotPrevTip()));
+
     QSettings *settings = ICore::instance()->settings();
     int id = settings->value("General/WelcomeTab", 0).toInt();
     m_d->btnGrp->button(id)->setChecked(true);
@@ -215,8 +226,7 @@ void WelcomeMode::updateWelcomePage(const WelcomePageData &welcomePageData)
         m_d->ui.projTreeWidget->clear();
 
         if (welcomePageData.sessionList.count() > 1) {
-            // limit list to 7 displayed entries to avoid a scrollbar
-            foreach (const QString &s, welcomePageData.sessionList.mid(0, 6)) {
+            foreach (const QString &s, welcomePageData.sessionList) {
                 QString str = s;
                 if (s == welcomePageData.previousSession)
                     str = tr("%1 (last session)").arg(s);
@@ -229,8 +239,7 @@ void WelcomeMode::updateWelcomePage(const WelcomePageData &welcomePageData)
         }
 
         typedef QPair<QString, QString> QStringPair;
-        // limit list to 8 displayed entries to avoid a scrollbar
-        foreach (const QStringPair &it, welcomePageData.projectList.mid(0, 7)) {
+        foreach (const QStringPair &it, welcomePageData.projectList) {
             QTreeWidgetItem *item = m_d->ui.projTreeWidget->addItem(it.second, it.first);
             const QFileInfo fi(it.first);
             item->setToolTip(1, QDir::toNativeSeparators(fi.absolutePath()));
@@ -282,7 +291,19 @@ void WelcomeMode::slotFeedback()
             "http://www.qtsoftware.com/forms/feedback-forms/qt-creator-user-feedback/view")));
 }
 
-QString WelcomeMode::getTipOfTheDay()
+void WelcomeMode::slotNextTip()
+{
+    QStringList tips = tipsOfTheDay();
+    m_d->ui.didYouKnowTextBrowser->setText(tips.at((++m_d->currentTip)%tips.count()));
+}
+
+void WelcomeMode::slotPrevTip()
+{
+    QStringList tips = tipsOfTheDay();
+    m_d->ui.didYouKnowTextBrowser->setText(tips.at((--m_d->currentTip)%tips.count()));
+}
+
+QStringList WelcomeMode::tipsOfTheDay()
 {
     static QStringList tips;
     if (tips.isEmpty()) {
@@ -292,17 +313,13 @@ QString WelcomeMode::getTipOfTheDay()
         tips.append(tr("You can show and hide the side bar using <tt>Alt+0<tt>."));
         tips.append(tr("You can fine tune the <tt>Find</tt> function by selecting &quot;Whole Words&quot; "
                        "or &quot;Case Sensitive&quot;. Simply click on the icons on the right end of the line edit."));                       
-        tips.append(tr("If you add a <a href=\"qthelp://com.nokia.qtcreator/doc/creator-external-library-handling.html\""
+        tips.append(tr("If you add <a href=\"qthelp://com.nokia.qtcreator/doc/creator-external-library-handling.html\""
                        ">external libraries</a>, Qt Creator will automatically offer syntax highlighting "
                         "and code completion."));
     }
-
-    srand(QDateTime::currentDateTime().toTime_t());
-    return tips.at(rand()%tips.count());
+    return tips;
 }
 
-
-
 // ---  WelcomeModeButton
 
 WelcomeModeButton::WelcomeModeButton(QWidget *parent) :
diff --git a/src/plugins/coreplugin/welcomemode.h b/src/plugins/coreplugin/welcomemode.h
index ecdf2cbe50bce9b0200199bc96b689d133a815a9..49306df611be6651099b3a0e85770f557af007b7 100644
--- a/src/plugins/coreplugin/welcomemode.h
+++ b/src/plugins/coreplugin/welcomemode.h
@@ -86,10 +86,12 @@ private slots:
     void slotSessionClicked(const QString &data);
     void slotProjectClicked(const QString &data);
     void slotUrlClicked(const QString &data);
+    void slotNextTip();
+    void slotPrevTip();
 
 private:
     void activateEditMode();
-    QString getTipOfTheDay();
+    QStringList tipsOfTheDay();
 
     WelcomeModePrivate *m_d;
 };
diff --git a/src/plugins/coreplugin/welcomemode.ui b/src/plugins/coreplugin/welcomemode.ui
index f477411bbdedbf9342f4916498ebd398dfa008b5..a89d02e38877d57b54327a3a62d1d4f74620953f 100644
--- a/src/plugins/coreplugin/welcomemode.ui
+++ b/src/plugins/coreplugin/welcomemode.ui
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>721</width>
+    <width>742</width>
     <height>637</height>
    </rect>
   </property>
@@ -15,11 +15,14 @@
 background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(247, 247, 247, 255), stop:1 rgba(215, 215, 215, 255));
 }</string>
   </property>
-  <layout class="QGridLayout" name="gridLayout_4">
+  <layout class="QVBoxLayout" name="verticalLayout_4">
+   <property name="spacing">
+    <number>0</number>
+   </property>
    <property name="margin">
     <number>0</number>
    </property>
-   <item row="0" column="0">
+   <item>
     <widget class="QWidget" name="gradientWidget" native="true">
      <property name="styleSheet">
       <string>#gradientWidget {
@@ -27,32 +30,21 @@ background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0
 }</string>
      </property>
      <layout class="QGridLayout" name="gridLayout">
-      <item row="0" column="1">
-       <spacer name="verticalSpacer_3">
-        <property name="orientation">
-         <enum>Qt::Vertical</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>0</width>
-          <height>0</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item row="1" column="0">
-       <spacer name="horizontalSpacer">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>0</width>
-          <height>0</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
+      <property name="leftMargin">
+       <number>4</number>
+      </property>
+      <property name="topMargin">
+       <number>4</number>
+      </property>
+      <property name="rightMargin">
+       <number>0</number>
+      </property>
+      <property name="bottomMargin">
+       <number>0</number>
+      </property>
+      <property name="spacing">
+       <number>0</number>
+      </property>
       <item row="1" column="1">
        <widget class="QFrame" name="mainFrame">
         <property name="minimumSize">
@@ -64,7 +56,7 @@ background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0
         <property name="maximumSize">
          <size>
           <width>662</width>
-          <height>515</height>
+          <height>16777215</height>
          </size>
         </property>
         <property name="styleSheet">
@@ -137,7 +129,7 @@ background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0
             <bool>false</bool>
            </property>
            <property name="styleSheet">
-            <string>#navFrame QToolButton {
+            <string notr="true">#navFrame QToolButton {
   border: none; 
   font-size: 10pt;
   color: grey;
@@ -147,9 +139,9 @@ background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0
   color: black;
 }
 
-#navFrame QToolButton:checked {
+#navFrame QToolButton:checked {  
   color: black;
-  border-bottom: 1px solid palette(Text);
+  border-bottom: 1px solid ;
 }</string>
            </property>
            <property name="frameShape">
@@ -210,341 +202,355 @@ background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0
          <item>
           <widget class="QStackedWidget" name="stackedWidget">
            <property name="currentIndex">
-            <number>2</number>
+            <number>1</number>
            </property>
-           <widget class="QWidget" name="page">
-            <widget class="QFrame" name="recentProjectsFrame_2">
-             <property name="geometry">
-              <rect>
-               <x>30</x>
-               <y>20</y>
-               <width>270</width>
-               <height>290</height>
-              </rect>
-             </property>
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="maximumSize">
-              <size>
-               <width>400</width>
-               <height>16777215</height>
-              </size>
-             </property>
-             <property name="styleSheet">
-              <string/>
-             </property>
-             <layout class="QGridLayout" name="gridLayout_6">
-              <item row="0" column="0">
-               <widget class="QLabel" name="projTitleLabel_2">
-                <property name="text">
-                 <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+           <widget class="QWidget" name="gettingStartedPage">
+            <layout class="QGridLayout" name="gridLayout_9">
+             <property name="margin">
+              <number>18</number>
+             </property>
+             <property name="spacing">
+              <number>24</number>
+             </property>
+             <item row="0" column="0" rowspan="2">
+              <widget class="QFrame" name="recentProjectsFrame_2">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="maximumSize">
+                <size>
+                 <width>400</width>
+                 <height>16777215</height>
+                </size>
+               </property>
+               <property name="styleSheet">
+                <string/>
+               </property>
+               <layout class="QGridLayout" name="gridLayout_6">
+                <item row="0" column="0">
+                 <widget class="QLabel" name="projTitleLabel_2">
+                  <property name="text">
+                   <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
 &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
 &lt;p style=&quot; margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:x-large; color:#555555;&quot;&gt;Tutorials&lt;/span&gt;&lt;/p&gt;
 &lt;hr /&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="0">
-               <widget class="Core::Internal::WelcomeModeTreeWidget" name="tutorialTreeWidget">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="focusPolicy">
-                 <enum>Qt::NoFocus</enum>
-                </property>
-                <property name="frameShape">
-                 <enum>QFrame::NoFrame</enum>
-                </property>
-                <property name="selectionMode">
-                 <enum>QAbstractItemView::NoSelection</enum>
-                </property>
-                <property name="verticalScrollMode">
-                 <enum>QAbstractItemView::ScrollPerPixel</enum>
-                </property>
-                <property name="rootIsDecorated">
-                 <bool>false</bool>
-                </property>
-                <property name="uniformRowHeights">
-                 <bool>true</bool>
-                </property>
-                <property name="allColumnsShowFocus">
-                 <bool>true</bool>
-                </property>
-                <property name="columnCount">
-                 <number>2</number>
-                </property>
-                <attribute name="headerVisible">
-                 <bool>false</bool>
-                </attribute>
-                <attribute name="headerDefaultSectionSize">
-                 <number>24</number>
-                </attribute>
-                <attribute name="headerMinimumSectionSize">
-                 <number>0</number>
-                </attribute>
-                <column>
-                 <property name="text">
-                  <string notr="true">1</string>
-                 </property>
-                </column>
-                <column>
-                 <property name="text">
-                  <string notr="true">2</string>
-                 </property>
-                </column>
-               </widget>
-              </item>
-             </layout>
-            </widget>
-            <widget class="QFrame" name="recentProjectsFrame_3">
-             <property name="geometry">
-              <rect>
-               <x>350</x>
-               <y>119</y>
-               <width>274</width>
-               <height>191</height>
-              </rect>
-             </property>
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="maximumSize">
-              <size>
-               <width>400</width>
-               <height>16777215</height>
-              </size>
-             </property>
-             <property name="styleSheet">
-              <string/>
-             </property>
-             <layout class="QGridLayout" name="gridLayout_7">
-              <item row="0" column="0">
-               <widget class="QLabel" name="projTitleLabel_3">
-                <property name="text">
-                 <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+                  </property>
+                  <property name="alignment">
+                   <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="0">
+                 <widget class="Core::Internal::WelcomeModeTreeWidget" name="tutorialTreeWidget">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="focusPolicy">
+                   <enum>Qt::NoFocus</enum>
+                  </property>
+                  <property name="frameShape">
+                   <enum>QFrame::NoFrame</enum>
+                  </property>
+                  <property name="selectionMode">
+                   <enum>QAbstractItemView::NoSelection</enum>
+                  </property>
+                  <property name="verticalScrollMode">
+                   <enum>QAbstractItemView::ScrollPerPixel</enum>
+                  </property>
+                  <property name="rootIsDecorated">
+                   <bool>false</bool>
+                  </property>
+                  <property name="uniformRowHeights">
+                   <bool>true</bool>
+                  </property>
+                  <property name="allColumnsShowFocus">
+                   <bool>true</bool>
+                  </property>
+                  <property name="columnCount">
+                   <number>2</number>
+                  </property>
+                  <attribute name="headerVisible">
+                   <bool>false</bool>
+                  </attribute>
+                  <attribute name="headerDefaultSectionSize">
+                   <number>24</number>
+                  </attribute>
+                  <attribute name="headerMinimumSectionSize">
+                   <number>0</number>
+                  </attribute>
+                  <column>
+                   <property name="text">
+                    <string notr="true">1</string>
+                   </property>
+                  </column>
+                  <column>
+                   <property name="text">
+                    <string notr="true">2</string>
+                   </property>
+                  </column>
+                 </widget>
+                </item>
+               </layout>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QFrame" name="recentProjectsFrame_4">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="maximumSize">
+                <size>
+                 <width>400</width>
+                 <height>16777215</height>
+                </size>
+               </property>
+               <property name="styleSheet">
+                <string/>
+               </property>
+               <layout class="QGridLayout" name="gridLayout_8">
+                <item row="0" column="0" colspan="3">
+                 <widget class="QLabel" name="projTitleLabel_4">
+                  <property name="text">
+                   <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
 &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:x-large; color:#555555;&quot;&gt;Did you know?&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:x-large; color:#555555;&quot;&gt;Qt Demos and Examples&lt;/span&gt;&lt;/p&gt;
 &lt;hr /&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="0">
-               <widget class="QTextBrowser" name="didYouKnowTextBrowser">
-                <property name="frameShape">
-                 <enum>QFrame::NoFrame</enum>
-                </property>
-                <property name="frameShadow">
-                 <enum>QFrame::Plain</enum>
-                </property>
-                <property name="verticalScrollBarPolicy">
-                 <enum>Qt::ScrollBarAlwaysOff</enum>
-                </property>
-                <property name="horizontalScrollBarPolicy">
-                 <enum>Qt::ScrollBarAlwaysOff</enum>
-                </property>
-                <property name="openExternalLinks">
-                 <bool>true</bool>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </widget>
-            <widget class="QFrame" name="recentProjectsFrame_4">
-             <property name="geometry">
-              <rect>
-               <x>350</x>
-               <y>20</y>
-               <width>271</width>
-               <height>83</height>
-              </rect>
-             </property>
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="maximumSize">
-              <size>
-               <width>400</width>
-               <height>16777215</height>
-              </size>
-             </property>
-             <property name="styleSheet">
-              <string/>
-             </property>
-             <layout class="QGridLayout" name="gridLayout_8">
-              <item row="0" column="0" colspan="3">
-               <widget class="QLabel" name="projTitleLabel_4">
-                <property name="text">
-                 <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+                  </property>
+                  <property name="alignment">
+                   <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="0">
+                 <widget class="QComboBox" name="comboBox">
+                  <property name="enabled">
+                   <bool>false</bool>
+                  </property>
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="1">
+                 <widget class="QToolButton" name="toolButton">
+                  <property name="enabled">
+                   <bool>false</bool>
+                  </property>
+                  <property name="text">
+                   <string>Open</string>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QFrame" name="recentProjectsFrame_3">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="maximumSize">
+                <size>
+                 <width>400</width>
+                 <height>16777215</height>
+                </size>
+               </property>
+               <property name="styleSheet">
+                <string/>
+               </property>
+               <layout class="QGridLayout" name="gridLayout_10">
+                <item row="0" column="0">
+                 <widget class="QLabel" name="projTitleLabel_3">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
 &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:x-large; color:#555555;&quot;&gt;Explore Demos and Examples&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:x-large; color:#555555;&quot;&gt;Did you know?&lt;/span&gt;&lt;/p&gt;
 &lt;hr /&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="0">
-               <widget class="QComboBox" name="comboBox">
-                <property name="enabled">
-                 <bool>false</bool>
-                </property>
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="1">
-               <widget class="QToolButton" name="toolButton">
-                <property name="enabled">
-                 <bool>false</bool>
-                </property>
-                <property name="text">
-                 <string>Open</string>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </widget>
+                  </property>
+                  <property name="alignment">
+                   <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="0" colspan="3">
+                 <widget class="QTextBrowser" name="didYouKnowTextBrowser">
+                  <property name="frameShape">
+                   <enum>QFrame::NoFrame</enum>
+                  </property>
+                  <property name="frameShadow">
+                   <enum>QFrame::Plain</enum>
+                  </property>
+                  <property name="verticalScrollBarPolicy">
+                   <enum>Qt::ScrollBarAlwaysOff</enum>
+                  </property>
+                  <property name="horizontalScrollBarPolicy">
+                   <enum>Qt::ScrollBarAlwaysOff</enum>
+                  </property>
+                  <property name="openExternalLinks">
+                   <bool>true</bool>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="2">
+                 <layout class="QHBoxLayout" name="horizontalLayout_2">
+                  <item>
+                   <widget class="QToolButton" name="prevTipBtn">
+                    <property name="text">
+                     <string>&lt;</string>
+                    </property>
+                    <property name="arrowType">
+                     <enum>Qt::LeftArrow</enum>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <widget class="QToolButton" name="nextTipBtn">
+                    <property name="text">
+                     <string>&gt;</string>
+                    </property>
+                    <property name="arrowType">
+                     <enum>Qt::RightArrow</enum>
+                    </property>
+                   </widget>
+                  </item>
+                 </layout>
+                </item>
+               </layout>
+              </widget>
+             </item>
+            </layout>
            </widget>
-           <widget class="QWidget" name="page_2">
-            <widget class="QFrame" name="recentSessionsFrame">
-             <property name="geometry">
-              <rect>
-               <x>30</x>
-               <y>20</y>
-               <width>270</width>
-               <height>291</height>
-              </rect>
-             </property>
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="minimumSize">
-              <size>
-               <width>270</width>
-               <height>130</height>
-              </size>
-             </property>
-             <property name="maximumSize">
-              <size>
-               <width>270</width>
-               <height>16777215</height>
-              </size>
-             </property>
-             <property name="styleSheet">
-              <string/>
-             </property>
-             <layout class="QGridLayout" name="gridLayout_3">
-              <item row="0" column="0" colspan="2">
-               <widget class="QLabel" name="titleLabel">
-                <property name="text">
-                 <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+           <widget class="QWidget" name="developPage">
+            <layout class="QGridLayout" name="gridLayout_4">
+             <property name="margin">
+              <number>18</number>
+             </property>
+             <property name="spacing">
+              <number>24</number>
+             </property>
+             <item row="0" column="0">
+              <widget class="QFrame" name="recentSessionsFrame">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="minimumSize">
+                <size>
+                 <width>270</width>
+                 <height>130</height>
+                </size>
+               </property>
+               <property name="styleSheet">
+                <string/>
+               </property>
+               <layout class="QGridLayout" name="gridLayout_3">
+                <item row="0" column="0" colspan="2">
+                 <widget class="QLabel" name="titleLabel">
+                  <property name="text">
+                   <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
 &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
 &lt;p style=&quot; margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:x-large; color:#555555;&quot;&gt;Sessions&lt;/span&gt;&lt;/p&gt;
 &lt;hr /&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="0" colspan="2">
-               <widget class="Core::Internal::WelcomeModeTreeWidget" name="sessTreeWidget">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="focusPolicy">
-                 <enum>Qt::NoFocus</enum>
-                </property>
-                <property name="frameShape">
-                 <enum>QFrame::NoFrame</enum>
-                </property>
-                <property name="selectionMode">
-                 <enum>QAbstractItemView::NoSelection</enum>
-                </property>
-                <property name="verticalScrollMode">
-                 <enum>QAbstractItemView::ScrollPerPixel</enum>
-                </property>
-                <property name="rootIsDecorated">
-                 <bool>false</bool>
-                </property>
-                <property name="uniformRowHeights">
-                 <bool>true</bool>
-                </property>
-                <property name="allColumnsShowFocus">
-                 <bool>true</bool>
-                </property>
-                <property name="columnCount">
-                 <number>2</number>
-                </property>
-                <attribute name="headerVisible">
-                 <bool>false</bool>
-                </attribute>
-                <attribute name="headerDefaultSectionSize">
-                 <number>24</number>
-                </attribute>
-                <attribute name="headerMinimumSectionSize">
-                 <number>0</number>
-                </attribute>
-                <column>
-                 <property name="text">
-                  <string notr="true">1</string>
-                 </property>
-                </column>
-                <column>
-                 <property name="text">
-                  <string notr="true">2</string>
-                 </property>
-                </column>
-               </widget>
-              </item>
-              <item row="2" column="0">
-               <widget class="Core::Internal::WelcomeModeButton" name="restoreSessionButton">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="styleSheet">
-                 <string>* {
+                  </property>
+                  <property name="alignment">
+                   <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="0" colspan="2">
+                 <widget class="Core::Internal::WelcomeModeTreeWidget" name="sessTreeWidget">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="focusPolicy">
+                   <enum>Qt::NoFocus</enum>
+                  </property>
+                  <property name="frameShape">
+                   <enum>QFrame::NoFrame</enum>
+                  </property>
+                  <property name="selectionMode">
+                   <enum>QAbstractItemView::NoSelection</enum>
+                  </property>
+                  <property name="verticalScrollMode">
+                   <enum>QAbstractItemView::ScrollPerPixel</enum>
+                  </property>
+                  <property name="rootIsDecorated">
+                   <bool>false</bool>
+                  </property>
+                  <property name="uniformRowHeights">
+                   <bool>true</bool>
+                  </property>
+                  <property name="allColumnsShowFocus">
+                   <bool>true</bool>
+                  </property>
+                  <property name="columnCount">
+                   <number>2</number>
+                  </property>
+                  <attribute name="headerVisible">
+                   <bool>false</bool>
+                  </attribute>
+                  <attribute name="headerDefaultSectionSize">
+                   <number>24</number>
+                  </attribute>
+                  <attribute name="headerMinimumSectionSize">
+                   <number>0</number>
+                  </attribute>
+                  <column>
+                   <property name="text">
+                    <string notr="true">1</string>
+                   </property>
+                  </column>
+                  <column>
+                   <property name="text">
+                    <string notr="true">2</string>
+                   </property>
+                  </column>
+                 </widget>
+                </item>
+                <item row="2" column="0">
+                 <widget class="Core::Internal::WelcomeModeButton" name="restoreSessionButton">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="styleSheet">
+                   <string>* {
     border-image: url(:/core/images/welcomemode/btn_26.png) 7;
     border-width: 7;
     padding: -2px 0;
@@ -558,308 +564,291 @@ p, li { white-space: pre-wrap; }
     color: white;
 }
 </string>
-                </property>
-                <property name="text">
-                 <string>&lt;qt&gt;Restore Last Session &amp;gt;&amp;gt;</string>
-                </property>
-               </widget>
-              </item>
-              <item row="2" column="1">
-               <spacer name="horizontalSpacer_3">
-                <property name="orientation">
-                 <enum>Qt::Horizontal</enum>
-                </property>
-                <property name="sizeHint" stdset="0">
-                 <size>
-                  <width>89</width>
-                  <height>22</height>
-                 </size>
-                </property>
-               </spacer>
-              </item>
-             </layout>
-            </widget>
-            <widget class="QFrame" name="recentProjectsFrame">
-             <property name="geometry">
-              <rect>
-               <x>350</x>
-               <y>20</y>
-               <width>270</width>
-               <height>291</height>
-              </rect>
-             </property>
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="maximumSize">
-              <size>
-               <width>270</width>
-               <height>16777215</height>
-              </size>
-             </property>
-             <property name="styleSheet">
-              <string/>
-             </property>
-             <layout class="QGridLayout" name="gridLayout_5">
-              <item row="0" column="0">
-               <widget class="QLabel" name="projTitleLabel">
-                <property name="text">
-                 <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+                  </property>
+                  <property name="text">
+                   <string>&lt;qt&gt;Restore Last Session &amp;gt;&amp;gt;</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="2" column="1">
+                 <spacer name="horizontalSpacer_3">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeType">
+                   <enum>QSizePolicy::Preferred</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>89</width>
+                    <height>22</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+               </layout>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QFrame" name="recentProjectsFrame">
+               <property name="styleSheet">
+                <string/>
+               </property>
+               <layout class="QGridLayout" name="gridLayout_5">
+                <item row="0" column="0">
+                 <widget class="QLabel" name="projTitleLabel">
+                  <property name="text">
+                   <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
 &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
 &lt;p style=&quot; margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:x-large; color:#555555;&quot;&gt;Projects&lt;/span&gt;&lt;/p&gt;
 &lt;hr /&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="0">
-               <widget class="Core::Internal::WelcomeModeTreeWidget" name="projTreeWidget">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="focusPolicy">
-                 <enum>Qt::NoFocus</enum>
-                </property>
-                <property name="frameShape">
-                 <enum>QFrame::NoFrame</enum>
-                </property>
-                <property name="selectionMode">
-                 <enum>QAbstractItemView::NoSelection</enum>
-                </property>
-                <property name="verticalScrollMode">
-                 <enum>QAbstractItemView::ScrollPerPixel</enum>
-                </property>
-                <property name="rootIsDecorated">
-                 <bool>false</bool>
-                </property>
-                <property name="uniformRowHeights">
-                 <bool>true</bool>
-                </property>
-                <property name="allColumnsShowFocus">
-                 <bool>true</bool>
-                </property>
-                <property name="columnCount">
-                 <number>2</number>
-                </property>
-                <attribute name="headerVisible">
-                 <bool>false</bool>
-                </attribute>
-                <attribute name="headerDefaultSectionSize">
-                 <number>24</number>
-                </attribute>
-                <attribute name="headerMinimumSectionSize">
-                 <number>0</number>
-                </attribute>
-                <column>
-                 <property name="text">
-                  <string notr="true">1</string>
-                 </property>
-                </column>
-                <column>
-                 <property name="text">
-                  <string notr="true">2</string>
-                 </property>
-                </column>
-               </widget>
-              </item>
-             </layout>
-            </widget>
+                  </property>
+                  <property name="alignment">
+                   <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="0">
+                 <widget class="Core::Internal::WelcomeModeTreeWidget" name="projTreeWidget">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="focusPolicy">
+                   <enum>Qt::NoFocus</enum>
+                  </property>
+                  <property name="frameShape">
+                   <enum>QFrame::NoFrame</enum>
+                  </property>
+                  <property name="selectionMode">
+                   <enum>QAbstractItemView::NoSelection</enum>
+                  </property>
+                  <property name="verticalScrollMode">
+                   <enum>QAbstractItemView::ScrollPerPixel</enum>
+                  </property>
+                  <property name="rootIsDecorated">
+                   <bool>false</bool>
+                  </property>
+                  <property name="uniformRowHeights">
+                   <bool>true</bool>
+                  </property>
+                  <property name="allColumnsShowFocus">
+                   <bool>true</bool>
+                  </property>
+                  <property name="columnCount">
+                   <number>2</number>
+                  </property>
+                  <attribute name="headerVisible">
+                   <bool>false</bool>
+                  </attribute>
+                  <attribute name="headerDefaultSectionSize">
+                   <number>24</number>
+                  </attribute>
+                  <attribute name="headerMinimumSectionSize">
+                   <number>0</number>
+                  </attribute>
+                  <column>
+                   <property name="text">
+                    <string notr="true">1</string>
+                   </property>
+                  </column>
+                  <column>
+                   <property name="text">
+                    <string notr="true">2</string>
+                   </property>
+                  </column>
+                 </widget>
+                </item>
+               </layout>
+              </widget>
+             </item>
+            </layout>
            </widget>
-           <widget class="QWidget" name="Seite">
-            <widget class="QFrame" name="frame">
-             <property name="geometry">
-              <rect>
-               <x>30</x>
-               <y>20</y>
-               <width>330</width>
-               <height>291</height>
-              </rect>
-             </property>
-             <property name="frameShape">
-              <enum>QFrame::StyledPanel</enum>
-             </property>
-             <property name="frameShadow">
-              <enum>QFrame::Raised</enum>
-             </property>
-             <layout class="QVBoxLayout" name="verticalLayout_2">
-              <item>
-               <widget class="QLabel" name="titleLabel_2">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="text">
-                 <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+           <widget class="QWidget" name="communityPage">
+            <layout class="QGridLayout" name="gridLayout_7">
+             <property name="margin">
+              <number>18</number>
+             </property>
+             <property name="spacing">
+              <number>24</number>
+             </property>
+             <item row="0" column="0">
+              <widget class="QFrame" name="frame">
+               <property name="frameShape">
+                <enum>QFrame::NoFrame</enum>
+               </property>
+               <property name="frameShadow">
+                <enum>QFrame::Plain</enum>
+               </property>
+               <layout class="QVBoxLayout" name="verticalLayout_2">
+                <item>
+                 <widget class="QLabel" name="titleLabel_2">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
 &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
 &lt;p style=&quot; margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:x-large; color:#555555;&quot;&gt;News from the Qt Labs&lt;/span&gt;&lt;/p&gt;
 &lt;hr /&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="Core::Internal::WelcomeModeTreeWidget" name="newsTreeWidget">
-                <property name="minimumSize">
-                 <size>
-                  <width>280</width>
-                  <height>0</height>
-                 </size>
-                </property>
-                <property name="focusPolicy">
-                 <enum>Qt::NoFocus</enum>
-                </property>
-                <property name="frameShape">
-                 <enum>QFrame::NoFrame</enum>
-                </property>
-                <property name="selectionMode">
-                 <enum>QAbstractItemView::NoSelection</enum>
-                </property>
-                <property name="verticalScrollMode">
-                 <enum>QAbstractItemView::ScrollPerPixel</enum>
-                </property>
-                <property name="rootIsDecorated">
-                 <bool>false</bool>
-                </property>
-                <property name="uniformRowHeights">
-                 <bool>true</bool>
-                </property>
-                <property name="allColumnsShowFocus">
-                 <bool>true</bool>
-                </property>
-                <property name="columnCount">
-                 <number>2</number>
-                </property>
-                <attribute name="headerVisible">
-                 <bool>false</bool>
-                </attribute>
-                <attribute name="headerDefaultSectionSize">
-                 <number>24</number>
-                </attribute>
-                <attribute name="headerMinimumSectionSize">
-                 <number>0</number>
-                </attribute>
-                <column>
-                 <property name="text">
-                  <string notr="true">1</string>
-                 </property>
-                </column>
-                <column>
-                 <property name="text">
-                  <string notr="true">2</string>
-                 </property>
-                </column>
-               </widget>
-              </item>
-             </layout>
-            </widget>
-            <widget class="QFrame" name="frame_2">
-             <property name="geometry">
-              <rect>
-               <x>400</x>
-               <y>20</y>
-               <width>220</width>
-               <height>290</height>
-              </rect>
-             </property>
-             <property name="frameShape">
-              <enum>QFrame::StyledPanel</enum>
-             </property>
-             <property name="frameShadow">
-              <enum>QFrame::Raised</enum>
-             </property>
-             <layout class="QVBoxLayout" name="verticalLayout_3">
-              <item>
-               <widget class="QLabel" name="titleLabel_3">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="text">
-                 <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+                  </property>
+                  <property name="alignment">
+                   <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="Core::Internal::WelcomeModeTreeWidget" name="newsTreeWidget">
+                  <property name="minimumSize">
+                   <size>
+                    <width>360</width>
+                    <height>0</height>
+                   </size>
+                  </property>
+                  <property name="focusPolicy">
+                   <enum>Qt::NoFocus</enum>
+                  </property>
+                  <property name="frameShape">
+                   <enum>QFrame::NoFrame</enum>
+                  </property>
+                  <property name="selectionMode">
+                   <enum>QAbstractItemView::NoSelection</enum>
+                  </property>
+                  <property name="verticalScrollMode">
+                   <enum>QAbstractItemView::ScrollPerPixel</enum>
+                  </property>
+                  <property name="rootIsDecorated">
+                   <bool>false</bool>
+                  </property>
+                  <property name="uniformRowHeights">
+                   <bool>true</bool>
+                  </property>
+                  <property name="allColumnsShowFocus">
+                   <bool>true</bool>
+                  </property>
+                  <property name="columnCount">
+                   <number>2</number>
+                  </property>
+                  <attribute name="headerVisible">
+                   <bool>false</bool>
+                  </attribute>
+                  <attribute name="headerDefaultSectionSize">
+                   <number>24</number>
+                  </attribute>
+                  <attribute name="headerMinimumSectionSize">
+                   <number>0</number>
+                  </attribute>
+                  <column>
+                   <property name="text">
+                    <string notr="true">1</string>
+                   </property>
+                  </column>
+                  <column>
+                   <property name="text">
+                    <string notr="true">2</string>
+                   </property>
+                  </column>
+                 </widget>
+                </item>
+               </layout>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QFrame" name="frame_2">
+               <property name="frameShape">
+                <enum>QFrame::NoFrame</enum>
+               </property>
+               <property name="frameShadow">
+                <enum>QFrame::Plain</enum>
+               </property>
+               <layout class="QVBoxLayout" name="verticalLayout_3">
+                <item>
+                 <widget class="QLabel" name="titleLabel_3">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="text">
+                   <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
 &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
 &lt;p style=&quot; margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:x-large; color:#555555;&quot;&gt;Qt Websites&lt;/span&gt;&lt;/p&gt;
 &lt;hr /&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="Core::Internal::WelcomeModeTreeWidget" name="sitesTreeWidget">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="focusPolicy">
-                 <enum>Qt::NoFocus</enum>
-                </property>
-                <property name="frameShape">
-                 <enum>QFrame::NoFrame</enum>
-                </property>
-                <property name="selectionMode">
-                 <enum>QAbstractItemView::NoSelection</enum>
-                </property>
-                <property name="verticalScrollMode">
-                 <enum>QAbstractItemView::ScrollPerPixel</enum>
-                </property>
-                <property name="rootIsDecorated">
-                 <bool>false</bool>
-                </property>
-                <property name="uniformRowHeights">
-                 <bool>true</bool>
-                </property>
-                <property name="allColumnsShowFocus">
-                 <bool>true</bool>
-                </property>
-                <property name="columnCount">
-                 <number>2</number>
-                </property>
-                <attribute name="headerVisible">
-                 <bool>false</bool>
-                </attribute>
-                <attribute name="headerDefaultSectionSize">
-                 <number>24</number>
-                </attribute>
-                <attribute name="headerMinimumSectionSize">
-                 <number>0</number>
-                </attribute>
-                <column>
-                 <property name="text">
-                  <string notr="true">1</string>
-                 </property>
-                </column>
-                <column>
-                 <property name="text">
-                  <string notr="true">2</string>
-                 </property>
-                </column>
-               </widget>
-              </item>
-             </layout>
-            </widget>
+                  </property>
+                  <property name="alignment">
+                   <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="Core::Internal::WelcomeModeTreeWidget" name="sitesTreeWidget">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="focusPolicy">
+                   <enum>Qt::NoFocus</enum>
+                  </property>
+                  <property name="frameShape">
+                   <enum>QFrame::NoFrame</enum>
+                  </property>
+                  <property name="selectionMode">
+                   <enum>QAbstractItemView::NoSelection</enum>
+                  </property>
+                  <property name="verticalScrollMode">
+                   <enum>QAbstractItemView::ScrollPerPixel</enum>
+                  </property>
+                  <property name="rootIsDecorated">
+                   <bool>false</bool>
+                  </property>
+                  <property name="uniformRowHeights">
+                   <bool>true</bool>
+                  </property>
+                  <property name="allColumnsShowFocus">
+                   <bool>true</bool>
+                  </property>
+                  <property name="columnCount">
+                   <number>2</number>
+                  </property>
+                  <attribute name="headerVisible">
+                   <bool>false</bool>
+                  </attribute>
+                  <attribute name="headerDefaultSectionSize">
+                   <number>24</number>
+                  </attribute>
+                  <attribute name="headerMinimumSectionSize">
+                   <number>0</number>
+                  </attribute>
+                  <column>
+                   <property name="text">
+                    <string notr="true">1</string>
+                   </property>
+                  </column>
+                  <column>
+                   <property name="text">
+                    <string notr="true">2</string>
+                   </property>
+                  </column>
+                 </widget>
+                </item>
+               </layout>
+              </widget>
+             </item>
+            </layout>
            </widget>
           </widget>
          </item>
@@ -934,32 +923,44 @@ p, li { white-space: pre-wrap; }
         </layout>
        </widget>
       </item>
-      <item row="1" column="2">
-       <spacer name="horizontalSpacer_4">
+      <item row="2" column="1">
+       <spacer name="verticalSpacer">
         <property name="orientation">
-         <enum>Qt::Horizontal</enum>
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeType">
+         <enum>QSizePolicy::Maximum</enum>
         </property>
         <property name="sizeHint" stdset="0">
          <size>
-          <width>0</width>
-          <height>0</height>
+          <width>20</width>
+          <height>40</height>
          </size>
         </property>
        </spacer>
       </item>
-      <item row="2" column="1">
+      <item row="0" column="1">
        <spacer name="verticalSpacer_2">
         <property name="orientation">
          <enum>Qt::Vertical</enum>
         </property>
+        <property name="sizeType">
+         <enum>QSizePolicy::Maximum</enum>
+        </property>
         <property name="sizeHint" stdset="0">
          <size>
-          <width>0</width>
-          <height>0</height>
+          <width>20</width>
+          <height>40</height>
          </size>
         </property>
        </spacer>
       </item>
+      <item row="1" column="0">
+       <layout class="QHBoxLayout" name="horizontalLayout_3"/>
+      </item>
+      <item row="1" column="2">
+       <layout class="QHBoxLayout" name="horizontalLayout_4"/>
+      </item>
      </layout>
     </widget>
    </item>
diff --git a/src/plugins/debugger/registerhandler.cpp b/src/plugins/debugger/registerhandler.cpp
index 2bb3ab289a7277ceca5a563d1537e947add38c76..219498ff408631d5f9b059bc8544015611e4a004 100644
--- a/src/plugins/debugger/registerhandler.cpp
+++ b/src/plugins/debugger/registerhandler.cpp
@@ -55,14 +55,12 @@ RegisterHandler::RegisterHandler(QObject *parent)
 
 int RegisterHandler::rowCount(const QModelIndex &parent) const
 {
-    Q_UNUSED(parent);
-    return m_registers.size();
+    return parent.isValid() ? 0 : m_registers.size();
 }
 
 int RegisterHandler::columnCount(const QModelIndex &parent) const
 {
-    Q_UNUSED(parent);
-    return 2;
+    return parent.isValid() ? 0 : 2;
 }
 
 QVariant RegisterHandler::data(const QModelIndex &index, int role) const
diff --git a/src/plugins/debugger/tcfengine.cpp b/src/plugins/debugger/tcfengine.cpp
index 20d2e98b0978e863f0c73aa66fe5b619164e89ed..32f2d96bb0fec7373f8cbd3fbb99f9bbe8c39c08 100644
--- a/src/plugins/debugger/tcfengine.cpp
+++ b/src/plugins/debugger/tcfengine.cpp
@@ -40,6 +40,7 @@
 #include "watchhandler.h"
 #include "watchutils.h"
 #include "moduleshandler.h"
+#include "gdbmi.h"
 
 #include <utils/qtcassert.h>
 
@@ -74,6 +75,21 @@ using namespace Debugger::Constants;
 #define STRINGIFY(x) STRINGIFY_INTERNAL(x)
 #define CB(callback) &TcfEngine::callback, STRINGIFY(callback)
 
+
+///////////////////////////////////////////////////////////////////////
+//
+// TcfData
+//
+///////////////////////////////////////////////////////////////////////
+
+
+TcfData::TcfData(const QByteArray &data)
+{
+    fromString(data);
+    qDebug() << "TCF RESPONSE: " << data << " -> " << toString();
+}
+
+
 ///////////////////////////////////////////////////////////////////////
 //
 // TcfEngine
@@ -119,8 +135,15 @@ void TcfEngine::socketReadyRead()
 {
     //XSDEBUG("TcfEngine::socketReadyRead()");
     m_inbuffer.append(m_socket->readAll());
-    //handleResponse(QByteArray::fromRawData(m_inbuffer.constData() + start, end - start));
-    handleResponse(m_inbuffer);
+    int pos = 0;
+    while (1) {
+        int next = m_inbuffer.indexOf("\3\1", pos);
+        //qDebug() << "pos: " << pos << "next: " << next;
+        if (next == -1)
+            break;
+        handleResponse(m_inbuffer.mid(pos, next - pos));
+        pos = next + 2; 
+    }
     m_inbuffer.clear();
 }
 
@@ -268,28 +291,61 @@ QList<Symbol> TcfEngine::moduleSymbols(const QString & /*moduleName*/)
 }
 
 
-void TcfEngine::handleResponse(const QByteArray &buf)
+void TcfEngine::handleResponse(const QByteArray &response)
 {
     static QTime lastTime;
 
     //emit tcfOutputAvailable(_("            "), currentTime());
-    TcfResponse response;
-    QList<QByteArray> parts = buf.split('\0');
+    QList<QByteArray> parts = response.split('\0');
+    if (parts.size() < 2 || !parts.last().isEmpty()) {
+        qDebug() << "Wrong response packet layout"
+            << quoteUnprintableLatin1(response);
+        return;
+    }
+    parts.removeLast(); // always empty
+    QByteArray tag = parts.at(0);
     int n = parts.size();
-    if (n >= 1)
-        response.tag = parts.at(0);
-    if (n >= 2)
-        response.service = parts.at(1);
-    if (n >= 3)
-        response.cmd = parts.at(2);
-    if (n >= 4)
-        response.data = parts.at(3);
-    if (response.cmd != "peerHeartBeat")
-        emit tcfOutputAvailable(_("\ntcf:"), quoteUnprintableLatin1(buf));
-    //emit tcfOutputAvailable(_("\ntcf:"), response.toString());
-    qDebug() << response.toString();
-
-    if (response.service == "Locator" && response.cmd == "Hello") {
+    if (n == 1 && tag == "N") { // unidentified command
+        qDebug() << "Command not recognized.";
+    } else if (n == 2 && tag == "N") { // flow control
+        int congestion = parts.at(1).toInt();
+        qDebug() << "Congestion: " << congestion;
+    } else if (n == 4 && tag == "R") { // result data
+        int token = parts.at(1).toInt();
+        QByteArray message = parts.at(2);
+        TcfData data(parts.at(3));
+        emit tcfOutputAvailable(_("\ntcf R:"), quoteUnprintableLatin1(response));
+        TcfCommand tcf = m_cookieForToken[token];
+        TcfData result(data);
+        //qDebug() << "Good response: " << quoteUnprintableLatin1(response);
+        if (tcf.callback)
+            (this->*(tcf.callback))(result, tcf.cookie);
+    } else if (n == 3 && tag == "P") { // progress data (partial result)
+        //int token = parts.at(1).toInt();
+        QByteArray data = parts.at(2);
+        emit tcfOutputAvailable(_("\ntcf P:"), quoteUnprintableLatin1(response));
+    } else if (n == 4 && tag == "E") { // an event
+        QByteArray service = parts.at(1);
+        QByteArray eventName = parts.at(2);
+        TcfData data(parts.at(3));
+        if (eventName != "peerHeartBeat")
+            emit tcfOutputAvailable(_("\ntcf E:"), quoteUnprintableLatin1(response));
+        if (service == "Locator" && eventName == "Hello") {
+            m_services.clear();
+            foreach (const GdbMi &service, data.children()) {
+                qDebug() << "Found service: " << service.data();
+                m_services.append(service.data());
+            }
+            QTimer::singleShot(0, this, SLOT(startDebugging()));
+        }
+    } else {
+        qDebug() << "Unknown response packet"
+            << quoteUnprintableLatin1(response) << parts;
+    }
+}
+
+void TcfEngine::startDebugging()
+{
         //postCommand('C', CB(handleRunControlSuspend),
         //    "RunControl", "suspend", "\"Thread1\"");
         //postCommand('C', CB(handleRunControlSuspend),
@@ -304,12 +360,6 @@ void TcfEngine::handleResponse(const QByteArray &buf)
         //postCommand('E', "Locator", "Hello", "");
         //postCommand('C', "Locator", "sync", "");
         //postCommand("Locator", "redirect", "ID");
-        return;
-    }
-
-    TcfCommand tcf = m_cookieForToken[1];
-    if (tcf.callback)
-        (this->*(tcf.callback))(response, tcf.cookie);
 }
 
 void TcfEngine::postCommand(char tag,
@@ -319,7 +369,7 @@ void TcfEngine::postCommand(char tag,
     const QByteArray &cmd,
     const QByteArray &args)
 {
-    static int token;
+    static int token = 50;
     ++token;
     
     const char delim = 0;
@@ -330,7 +380,7 @@ void TcfEngine::postCommand(char tag,
     QByteArray ba;
     ba.append(tag);
     ba.append(delim);
-    ba.append(QString::number(token).toLatin1());
+    ba.append(QByteArray::number(token));
     ba.append(delim);
     ba.append(service);
     ba.append(delim);
@@ -353,21 +403,22 @@ void TcfEngine::postCommand(char tag,
     emit tcfInputAvailable("send", QString::number(result));
 }
 
-void TcfEngine::handleRunControlSuspend(const TcfResponse &response, const QVariant &)
+void TcfEngine::handleRunControlSuspend(const TcfData &data, const QVariant &)
 {
     qDebug() << "HANDLE RESULT";
 }
 
-void TcfEngine::handleRunControlGetChildren(const TcfResponse &response, const QVariant &)
+void TcfEngine::handleRunControlGetChildren(const TcfData &data, const QVariant &)
 {
-    qDebug() << "HANDLE RESULT" << response.toString();
+    qDebug() << "HANDLE RUN CONTROL GET CHILDREN" << data.toString();
 }
 
-void TcfEngine::handleSysMonitorGetChildren(const TcfResponse &response, const QVariant &)
+void TcfEngine::handleSysMonitorGetChildren(const TcfData &data, const QVariant &)
 {
-    qDebug() << "HANDLE RESULT" << response.toString();
+    qDebug() << "HANDLE RUN CONTROL GET CHILDREN" << data.toString();
 }
 
+
 //////////////////////////////////////////////////////////////////////
 //
 // Tooltip specific stuff
diff --git a/src/plugins/debugger/tcfengine.h b/src/plugins/debugger/tcfengine.h
index c80411f14350a9fb2110dd9064fa69a9f862247d..eb965d1bc704817559f007c272000f351d0890cb 100644
--- a/src/plugins/debugger/tcfengine.h
+++ b/src/plugins/debugger/tcfengine.h
@@ -47,6 +47,7 @@ QT_END_NAMESPACE
 
 #include "idebuggerengine.h"
 #include "debuggermanager.h"
+#include "gdbmi.h"
 
 namespace Debugger {
 namespace Internal {
@@ -56,25 +57,10 @@ class IDebuggerManagerAccessForEngines;
 class ScriptAgent;
 class WatchData;
 
-class TcfResponse
+class TcfData : public GdbMi
 {
 public:
-    enum ResponseType
-    {
-        HelloResponse,
-        HeartBeatResponse
-    };
-
-    QString toString() const
-    {
-        return _("TAG: " + tag + "  SERVICE: " + service
-            + "  CMD: " + cmd + "  DATA: " + data);
-    }
-
-    QByteArray tag;
-    QByteArray service;
-    QByteArray cmd;
-    QByteArray data;
+    TcfData(const QByteArray &data);
 };
 
 class TcfEngine : public IDebuggerEngine
@@ -140,13 +126,15 @@ private:
     Q_SLOT void socketReadyRead();
 
     void handleResponse(const QByteArray &ba);
-    void handleRunControlSuspend(const TcfResponse &response, const QVariant &);
-    void handleRunControlGetChildren(const TcfResponse &response, const QVariant &);
-    void handleSysMonitorGetChildren(const TcfResponse &response, const QVariant &);
+    void handleRunControlSuspend(const TcfData &response, const QVariant &);
+    void handleRunControlGetChildren(const TcfData &response, const QVariant &);
+    void handleSysMonitorGetChildren(const TcfData &response, const QVariant &);
 
 private:
+    Q_SLOT void startDebugging();
+
     typedef void (TcfEngine::*TcfCommandCallback)
-        (const TcfResponse &record, const QVariant &cookie);
+        (const TcfData &record, const QVariant &cookie);
 
     struct TcfCommand
     {
@@ -171,6 +159,7 @@ private:
     IDebuggerManagerAccessForEngines *qq;
     QTcpSocket *m_socket;
     QByteArray m_inbuffer;
+    QStringList m_services;
 };
 
 } // namespace Internal
diff --git a/src/plugins/duieditor/duidocument.cpp b/src/plugins/duieditor/duidocument.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bd987e46bb3f4b671756d1d1e097f8e652f49f45
--- /dev/null
+++ b/src/plugins/duieditor/duidocument.cpp
@@ -0,0 +1,77 @@
+#include "duidocument.h"
+#include "parser/javascriptast_p.h"
+#include "parser/javascriptlexer_p.h"
+#include "parser/javascriptparser_p.h"
+#include "parser/javascriptengine_p.h"
+#include "parser/javascriptnodepool_p.h"
+
+using namespace DuiEditor;
+using namespace DuiEditor::Internal;
+using namespace JavaScript;
+
+DuiDocument::DuiDocument(const QString &fileName)
+    : _engine(0), _pool(0), _program(0), _fileName(fileName)
+{
+}
+
+DuiDocument::~DuiDocument()
+{
+    delete _engine;
+    delete _pool;
+}
+
+DuiDocument::Ptr DuiDocument::create(const QString &fileName)
+{
+    DuiDocument::Ptr doc(new DuiDocument(fileName));
+    return doc;
+}
+
+AST::UiProgram *DuiDocument::program() const
+{
+    return _program;
+}
+
+QList<JavaScriptParser::DiagnosticMessage> DuiDocument::diagnosticMessages() const
+{
+    return _diagnosticMessages;
+}
+
+void DuiDocument::setSource(const QString &source)
+{
+    _source = source;
+}
+
+bool DuiDocument::parse()
+{
+    Q_ASSERT(! _engine);
+    Q_ASSERT(! _pool);
+    Q_ASSERT(! _program);
+
+    _engine = new JavaScriptEnginePrivate();
+    _pool = new NodePool(_fileName, _engine);
+
+    JavaScriptParser parser;
+
+    NodePool nodePool(_fileName, _engine);
+    _engine->setNodePool(_pool);
+
+    Lexer lexer(_engine);
+    _engine->setLexer(&lexer);
+
+    lexer.setCode(_source, /*line = */ 1);
+
+    bool parsed = parser.parse(_engine);
+    _program = parser.ast();
+    _diagnosticMessages = parser.diagnosticMessages();
+    return parsed;
+}
+
+Snapshot::Snapshot()
+{
+}
+
+Snapshot::~Snapshot()
+{
+}
+
+
diff --git a/src/plugins/duieditor/duidocument.h b/src/plugins/duieditor/duidocument.h
new file mode 100644
index 0000000000000000000000000000000000000000..4449cb8d886b3a5d1a9e5e6f9c649edf0b373826
--- /dev/null
+++ b/src/plugins/duieditor/duidocument.h
@@ -0,0 +1,66 @@
+#ifndef DUIDOCUMENT_H
+#define DUIDOCUMENT_H
+
+#include <QtCore/QSharedPointer>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+
+#include "parser/javascriptparser_p.h"
+
+class JavaScriptEnginePrivate;
+
+namespace JavaScript {
+
+class NodePool;
+
+namespace AST {
+
+class UiProgram;
+
+} // end of namespace AST
+} // end of namespace JavaScript
+
+
+
+namespace DuiEditor {
+namespace Internal {
+
+class DuiDocument
+{
+public:
+    typedef QSharedPointer<DuiDocument> Ptr;
+
+protected:
+    DuiDocument(const QString &fileName);
+
+public:
+    ~DuiDocument();
+
+    static DuiDocument::Ptr create(const QString &fileName);
+
+    JavaScript::AST::UiProgram *program() const;
+    QList<JavaScriptParser::DiagnosticMessage> diagnosticMessages() const;
+
+    void setSource(const QString &source);
+    bool parse();
+
+private:
+    JavaScriptEnginePrivate *_engine;
+    JavaScript::NodePool *_pool;
+    JavaScript::AST::UiProgram *_program;
+    QList<JavaScriptParser::DiagnosticMessage> _diagnosticMessages;
+    QString _fileName;
+    QString _source;
+};
+
+class Snapshot: public QMap<QString, DuiDocument>
+{
+public:
+    Snapshot();
+    ~Snapshot();
+};
+
+} // end of namespace Internal
+} // emd of namespace DuiEditor
+
+#endif // DUIDOCUMENT_H
diff --git a/src/plugins/duieditor/duieditor.cpp b/src/plugins/duieditor/duieditor.cpp
index 263040207c506c22b61337eae2f146cb1585d9e7..ddae6b2939d70c714a50b935cdbdb094c8f95feb 100644
--- a/src/plugins/duieditor/duieditor.cpp
+++ b/src/plugins/duieditor/duieditor.cpp
@@ -31,15 +31,13 @@
 #include "duieditorconstants.h"
 #include "duihighlighter.h"
 #include "duieditorplugin.h"
+#include "duidocument.h"
 
 #include "rewriter/rewriter.h"
 
-#include "parser/javascriptengine_p.h"
-#include "parser/javascriptparser_p.h"
-#include "parser/javascriptlexer_p.h"
-#include "parser/javascriptnodepool_p.h"
 #include "parser/javascriptastvisitor_p.h"
 #include "parser/javascriptast_p.h"
+#include "parser/javascriptengine_p.h"
 
 #include <coreplugin/icore.h>
 #include <coreplugin/actionmanager/actionmanager.h>
@@ -435,29 +433,21 @@ void ScriptEditor::updateDocumentNow()
     m_updateDocumentTimer->stop();
 
     const QString fileName = file()->fileName();
-    const QString code = toPlainText();
-
-    JavaScriptParser parser;
-    JavaScriptEnginePrivate driver;
-
-    NodePool nodePool(fileName, &driver);
-    driver.setNodePool(&nodePool);
-
-    Lexer lexer(&driver);
-    lexer.setCode(code, /*line = */ 1);
-    driver.setLexer(&lexer);
+    const QString source = toPlainText();
 
-    bool parsed = parser.parse(&driver);
+    DuiDocument::Ptr doc = DuiDocument::create(fileName);
+    doc->setSource(source);
+    bool parsed = doc->parse();
 
     FindIdDeclarations updateIds;
-    m_ids = updateIds(parser.ast());
+    m_ids = updateIds(doc->program());
 
     if (parsed) {
         FindDeclarations findDeclarations;
-        m_declarations = findDeclarations(parser.ast());
+        m_declarations = findDeclarations(doc->program());
 
         FindWords findWords;
-        m_words = findWords(parser.ast());
+        m_words = findWords(doc->program());
 
         QStringList items;
         items.append(tr("<Select Symbol>"));
@@ -478,7 +468,7 @@ void ScriptEditor::updateDocumentNow()
 
     QTextEdit::ExtraSelection sel;
 
-    m_diagnosticMessages = parser.diagnosticMessages();
+    m_diagnosticMessages = doc->diagnosticMessages();
 
     foreach (const JavaScriptParser::DiagnosticMessage &d, m_diagnosticMessages) {
         int line = d.loc.startLine;
diff --git a/src/plugins/duieditor/duieditor.pro b/src/plugins/duieditor/duieditor.pro
index 4d0992bb2486a20bda092ca5fd7d463b128462fa..bfbd34788c43676195c4e67f2fbc66357878c5ce 100644
--- a/src/plugins/duieditor/duieditor.pro
+++ b/src/plugins/duieditor/duieditor.pro
@@ -27,7 +27,8 @@ duihighlighter.h \
 duieditoractionhandler.h \
 duicodecompletion.h \
 duieditorconstants.h \
-duihoverhandler.h
+duihoverhandler.h \
+duidocument.h
 
 SOURCES += duieditor.cpp \
 duieditorfactory.cpp \
@@ -35,6 +36,7 @@ duieditorplugin.cpp \
 duihighlighter.cpp \
 duieditoractionhandler.cpp \
 duicodecompletion.cpp \
-duihoverhandler.cpp
+duihoverhandler.cpp \
+duidocument.cpp
 
 RESOURCES += duieditor.qrc
diff --git a/tests/manual/preprocessor/main.cpp b/tests/manual/preprocessor/main.cpp
index b8395334f580108f7fbf797d80af924359834213..5170bdf26ab7307e76595e8a9097214dd14cd801 100644
--- a/tests/manual/preprocessor/main.cpp
+++ b/tests/manual/preprocessor/main.cpp
@@ -17,12 +17,16 @@ class MakeDepend: public Client
 {
     Environment *env;
     QList<QDir> systemDirs;
+    QStringList included;
 
 public:
     MakeDepend(Environment *env)
         : env(env)
     { }
 
+    QStringList includedFiles() const
+    { return included; }
+
     void addSystemDir(const QDir &dir)
     { systemDirs.append(dir); }
 
@@ -32,17 +36,22 @@ public:
     virtual void macroAdded(const Macro &)
     { }
 
-    virtual void sourceNeeded(QString &fileName, IncludeType mode, unsigned)
+    void addInclude(const QString &absoluteFilePath)
+    { included.append(absoluteFilePath); }
+
+    virtual void sourceNeeded(QString &fileName, IncludeType mode, unsigned line)
     {
+        // ### cache
+        const QString currentFile = QFile::decodeName(env->currentFile);
+
         if (mode == IncludeLocal) {
-            // ### cache
-            const QFileInfo currentFile(QFile::decodeName(env->currentFile));
-            const QDir dir = currentFile.dir();
+            const QFileInfo currentFileInfo(currentFile);
+            const QDir dir = currentFileInfo.dir();
 
+            // ### cleanup
             QFileInfo fileInfo(dir, fileName);
             if (fileInfo.exists()) {
-                fileName = fileInfo.absoluteFilePath();
-                std::cout << ' ' << qPrintable(fileName);
+                addInclude(fileInfo.absoluteFilePath());
                 return;
             }
         }
@@ -50,13 +59,15 @@ public:
         foreach (const QDir &dir, systemDirs) {
             QFileInfo fileInfo(dir, fileName);
             if (fileInfo.exists() && fileInfo.isFile()) {
-                fileName = fileInfo.absoluteFilePath();
-                std::cout << ' ' << qPrintable(fileName);
+                addInclude(fileInfo.absoluteFilePath());
                 return;
             }
         }
 
-        std::cerr << "file '" << qPrintable(fileName) << "' not found" << std::endl;
+#ifdef PP_WITH_DIAGNOSTICS
+        std::cerr << qPrintable(currentFile) << ':' << line << ": error: "
+                << qPrintable(fileName) << ": No such file or directory" << std::endl;
+#endif
     }
 
     virtual void startExpandingMacro(unsigned, const Macro &,
@@ -76,22 +87,51 @@ public:
 
 int main(int argc, char *argv[])
 {
-    Environment env;
-    MakeDepend client(&env);
+    QCoreApplication app(argc, argv);
+
+    QStringList todo = app.arguments();
+    todo.removeFirst();
+
+    if (todo.isEmpty())
+        todo.append(qgetenv("QTDIR") + "/include/QtCore/QtCore");
+
+    QMap<QString, QStringList> processed;
+
+    while (! todo.isEmpty()) {
+        const QString fn = todo.takeFirst();
+
+        if (processed.contains(fn))
+            continue;
 
-    client.addSystemDir(QLatin1String("/usr/include"));
-    Preprocessor preproc(&client, &env);
+        QStringList deps;
 
-    for (int i = 1; i < argc; ++i) {
-        const QByteArray fileName = argv[i];
-        std::cout << fileName.constData() << ':';
-        QFile file(QFile::decodeName(fileName));
+        QFile file(fn);
         if (file.open(QFile::ReadOnly)) {
             // ### we should QTextStream here.
             const QByteArray code = file.readAll();
-            preproc.preprocess(fileName, code, /*result = */ 0);
+
+            Environment env;
+            MakeDepend client(&env);
+            client.addSystemDir(qgetenv("QTDIR") + "/include");
+
+            Preprocessor preproc(&client, &env);
+            preproc.preprocess(QFile::encodeName(fn), code, /*result = */ 0);
+            deps = client.includedFiles();
+            todo += deps;
         }
-        std::cout << std::endl;
+
+        processed.insert(fn, deps);
+    }
+
+    QMapIterator<QString, QStringList> it(processed);
+    while (it.hasNext()) {
+        it.next();
+
+        if (it.value().isEmpty())
+            continue; // no deps, nothing to do.
+
+        std::cout << qPrintable(it.key()) << ": \\\n  " << qPrintable(it.value().join(QLatin1String(" \\\n  ")))
+                << std::endl << std::endl;
     }
 
     return 0;