[meego-commits] 11207: Changes to devel:tools:sdk:host/meego-sdk-qt-creator

Fathi Boudra no_reply at build.meego.com
Wed Dec 22 18:55:14 UTC 2010


Hi,
I have made the following changes to meego-sdk-qt-creator in project devel:tools:sdk:host. Please review and accept ASAP.

Thank You,
Fathi Boudra

[This message was auto-generated]

---

Request #11207:

  submit:   home:boudra:branches:devel:tools:sdk:host/meego-sdk-qt-creator(r7)(cleanup) -> devel:tools:sdk:host/meego-sdk-qt-creator


Message:
    * Tue Dec 21 2010 Fathi Boudra <fathi.boudra at nokia.com> - 2.1.0~rc1
- Add ftbfs_missing_webkit.patch to fix a build failure against Qt built with
  QtWebKit module
- Add ftbfs_allow-shlib-undefined_no-undefined.patch to fix a build failure
  caused by some linker flags
- Add buildservice_plugin_20101217.patch to enable OBS plugin
- Add libattica-devel BuildRequires to build the OBS plugin

State:   new          2010-12-22T10:55:13 boudra
Comment: None



changes files:
--------------
--- meego-sdk-qt-creator.changes
+++ meego-sdk-qt-creator.changes
@@ -0,0 +1,8 @@
+* Tue Dec 21 2010 Fathi Boudra <fathi.boudra at nokia.com> - 2.1.0~rc1
+- Add ftbfs_missing_webkit.patch to fix a build failure against Qt built with
+  QtWebKit module
+- Add ftbfs_allow-shlib-undefined_no-undefined.patch to fix a build failure
+  caused by some linker flags
+- Add buildservice_plugin_20101217.patch to enable OBS plugin
+- Add libattica-devel BuildRequires to build the OBS plugin
+

new:
----
  buildservice_plugin_20101217.patch
  ftbfs_allow-shlib-undefined_no-undefined.patch
  ftbfs_missing_webkit.patch

spec files:
-----------
--- meego-sdk-qt-creator.spec
+++ meego-sdk-qt-creator.spec
@@ -21,13 +21,22 @@
 Source4:        mtf.png
 Source5:        meego-sdk-qtcreator.sh
 Patch0:         meego-sdk-qt-creator-%{upstream_version}.patch.bz2
+Patch1:         ftbfs_missing_webkit.patch
+Patch2:         ftbfs_allow-shlib-undefined_no-undefined.patch
+Patch3:         buildservice_plugin_20101217.patch
 BuildRequires:  desktop-file-utils
 BuildRequires:  gcc-c++
+BuildRequires:  libattica-devel
 BuildRequires:  meego-sdk-libqt-devel >= 4.7.1
 BuildRequires:  meego-sdk-qt-devel-tools >= 4.7.1
 Requires:       meego-sdk-libqthelp4 >= 4.7.1
 Requires:       meego-sdk-libqtsql4-sqlite >= 4.7.1
 Requires:       meego-sdk-qt-qmake >= 4.7.1
+Requires(post): desktop-file-utils
+Requires(post): shared-mime-info
+Requires(postun): desktop-file-utils
+Requires(postun): shared-mime-info
+%if 0%{?fedora}
 # workaround to pull expected requires on Fedora
 Requires:       meego-sdk-libqtcore4 >= 4.7.1
 Requires:       meego-sdk-libqtdeclarative4 >= 4.7.1
@@ -36,12 +45,10 @@
 Requires:       meego-sdk-libqtnetwork4 >= 4.7.1
 Requires:       meego-sdk-libqtscript4 >= 4.7.1
 Requires:       meego-sdk-libqtsql4 >= 4.7.1
+Requires:       meego-sdk-libqtsvg4 >= 4.7.1
 Requires:       meego-sdk-libqtxml4 >= 4.7.1
-# --------------------------------------------------
-Requires(post): desktop-file-utils
-Requires(post): shared-mime-info
-Requires(postun): desktop-file-utils
-Requires(postun): shared-mime-info
+Requires:       meego-sdk-libqtwebkit4 >= 4.7.1
+%endif
 ExclusiveArch:  %{ix86} x86_64
 
 %define _optify_prefix  /opt/meego/%{name}
@@ -59,6 +66,12 @@
 %setup -q -n qt-creator-%{upstream_version}-src
 # meego-sdk-qt-creator-%{upstream_version}.patch.bz2
 %patch0 -p1
+# ftbfs_missing_webkit.patch
+%patch1 -p1
+# ftbfs_allow-shlib-undefined_no-undefined.patch
+%patch2 -p1
+# buildservice_plugin_20101217.patch
+%patch3 -p1
 
 %build
 # Copy qemu icons
@@ -155,6 +168,7 @@
 %{_optify_libdir}/qtcreator/libsymbianutils.*
 %{_optify_libdir}/qtcreator/plugins/Nokia/BinEditor.pluginspec
 %{_optify_libdir}/qtcreator/plugins/Nokia/Bookmarks.pluginspec
+%{_optify_libdir}/qtcreator/plugins/Nokia/BuildService.pluginspec
 %{_optify_libdir}/qtcreator/plugins/Nokia/CMakeProjectManager.pluginspec
 %{_optify_libdir}/qtcreator/plugins/Nokia/CVS.pluginspec
 %{_optify_libdir}/qtcreator/plugins/Nokia/ClassView.pluginspec
@@ -188,6 +202,7 @@
 %{_optify_libdir}/qtcreator/plugins/Nokia/Welcome.pluginspec
 %{_optify_libdir}/qtcreator/plugins/Nokia/libBinEditor.so
 %{_optify_libdir}/qtcreator/plugins/Nokia/libBookmarks.so
+%{_optify_libdir}/qtcreator/plugins/Nokia/libBuildService.so
 %{_optify_libdir}/qtcreator/plugins/Nokia/libCMakeProjectManager.so
 %{_optify_libdir}/qtcreator/plugins/Nokia/libCVS.so
 %{_optify_libdir}/qtcreator/plugins/Nokia/libClassView.so

dsc files:
----------
--- meego-sdk-qt-creator.dsc
+++ meego-sdk-qt-creator.dsc
@@ -2,9 +2,9 @@
 Source: qtcreator
 Binary: meego-sdk-qtcreator, meego-sdk-qtcreator-doc
 Architecture: any
-Version: 2.1.0~rc1-1
+Version: 2.1.0~rc1-3
 Maintainer: Fathi Boudra <fathi.boudra at nokia.com>
 Homepage: http://www.qtsoftware.com/developer/qt-creator
 Standards-Version: 3.8.0
-Build-Depends: debhelper (>= 7.0.50), quilt, sharutils, meego-sdk-libqt4-dev (>= 4.7.1), meego-sdk-qt4-dev-tools (>= 4.7.1)
+Build-Depends: debhelper (>= 7.0.50), quilt, sharutils, libattica-dev, meego-sdk-libqt4-dev (>= 4.7.1), meego-sdk-qt4-dev-tools (>= 4.7.1)
 Debtransform-Tar: qt-creator-2.1.0-rc1-src.tar.gz

other changes:
--------------

++++++ buildservice_plugin_20101217.patch (new)
--- buildservice_plugin_20101217.patch
+++ buildservice_plugin_20101217.patch
+--- /dev/null
++++ b/src/plugins/buildservice/BuildService.pluginspec
+@@ -0,0 +1,17 @@
++<plugin name="BuildService" version="2.0.80" compatVersion="2.0.80">
++    <vendor>open-slx</vendor>
++    <copyright>2010 open-slx; 2010 Sebastian Kügler</copyright>
++    <license>
++GNU Lesser General Public License Usage
++
++This plugin may be used under the terms of the GNU Lesser
++General Public License version 2.1 as published by the Free Software
++Foundation.  Please review the following information to
++ensure the GNU Lesser General Public License version 2.1 requirements
++will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
++    <description>Buildservice integration for Qt Creator</description>
++    <url>http://www.open-slx.com</url>
++    <dependencyList>
++        <dependency name="Core" version="2.0.0"/>
++    </dependencyList>
++</plugin>
+--- /dev/null
++++ b/src/plugins/buildservice/buildservice-standalone.pro
+@@ -0,0 +1,15 @@
++TEMPLATE = app
++
++CONFIG += link_pkgconfig
++
++PKGCONFIG += libattica
++QT += webkit
++HEADERS += buildservicemanager.h \
++           checkablefilesystemmodel.h
++
++SOURCES += main.cpp \
++           buildservicemanager.cpp \
++           checkablefilesystemmodel.cpp
++
++FORMS += editproject.ui
++
+--- /dev/null
++++ b/src/plugins/buildservice/buildservice.pro
+@@ -0,0 +1,25 @@
++TEMPLATE = lib
++TARGET = BuildService
++
++include(../../qtcreatorplugin.pri)
++include(../../plugins/coreplugin/coreplugin.pri)
++include(../../plugins/projectexplorer/projectexplorer.pri)
++
++CONFIG += link_pkgconfig
++QT += webkit
++PKGCONFIG += libattica
++
++HEADERS += buildserviceplugin.h \
++           buildservicemanager.h \
++           checkablefilesystemmodel.h \
++    getcredentials.h
++
++SOURCES += buildserviceplugin.cpp \
++           buildservicemanager.cpp \
++           checkablefilesystemmodel.cpp \
++    getcredentials.cpp
++
++FORMS += editproject.ui \
++    getcredentials.ui
++
++OTHER_FILES += BuildService.pluginspec
+--- /dev/null
++++ b/src/plugins/buildservice/buildservicemanager.cpp
+@@ -0,0 +1,1063 @@
++/**************************************************************************
++**
++** This file is part of Qt Creator
++**
++** Copyright 2010 open-slx: <sebas at open-slx.com>
++**
++** GNU Lesser General Public License Usage
++**
++** This file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file.  Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** If you are unsure which license is appropriate for your use, please
++** contact the sales department at http://www.qtsoftware.com/contact.
++**
++**************************************************************************/
++
++// Own
++#include "buildservicemanager.h"
++#include "getcredentials.h"
++
++// Qt
++#include <QtCore/QDebug>
++#include <QtCore/QFile>
++#include <QtCore/QFileInfo>
++#include <QtGui/QLabel>
++#include <QtGui/QListWidgetItem>
++#include <QtGui/QMenu>
++#include <QtGui/QMenuBar>
++#include <QtGui/QMessageBox>
++#include <QtGui/QTextBrowser>
++#include <QtCore/QProcess>
++#include <QtGui/QVBoxLayout>
++
++// libattica
++#include <attica/itemjob.h>
++#include <attica/buildservice.h>
++#include <attica/buildservicejob.h>
++#include <attica/buildservicejoboutput.h>
++#include <attica/listjob.h>
++#include <attica/provider.h>
++#include <attica/project.h>
++#include <attica/publisher.h>
++#include <attica/remoteaccount.h>
++
++using namespace Attica;
++
++BuildServiceManager::BuildServiceManager(QWidget * parent, Qt::WindowFlags f) : QDialog(parent, f),
++    m_mainWidget(0)
++{
++//    QVBoxLayout *layout = new QVBoxLayout(this);
++//    setLayout(layout);
++//    setModal(false);
++
++//    m_mainWidget = new QWidget(this);
++//    layout->addWidget(m_mainWidget);
++    m_editor = new Ui::EditProject();
++    m_editor->setupUi(this);
++
++    m_filesModel = new CheckableFileSystemModel(this);
++    m_editor->treeView->setModel(m_filesModel);
++    setProjectPath(QDir::homePath());
++    m_editor->welcome->setHtml(tr("<h3>Build Service</h3> \
++<p>This plugin allows you to upload your project to a build service. \
++In order to publish your project, you can follow some simple steps:\
++<ol>\
++<li>\
++<b>Manage Accounts</b> In order to submit your project to a build service \
++under your account, please enter login information for the build service(s) \
++you would like to use.\
++</li>\
++<li>\
++<b>Register your Projects</b> The next page allows you to enter meta-information \
++necessary for your project, so it can be supplied to different buildservices.\
++</li>\
++<li>\
++<b>Upload your Code</b> or update before you start the build jobs on the build \
++service. \
++</li>\
++<li>\
++<b>Create a Build Job</b> Now you can submit your project as build job to one \
++or more build services. You can keep track of your builds on the <i>Build</i> \
++page.\
++</li>\
++<li>\
++<b>Publish your Project</b> The final step is to publish your application, \
++so it can be downloaded by others.\
++</li>\
++</ol>\
++\
++All this information will be stored on your Open Collaboration Server, so you \
++can access this information from any machine.</p>"));
++
++    setWindowTitle(tr("Buildservice Manager"));
++    // Project page
++    connect(m_editor->projectsCombo, SIGNAL(currentIndexChanged(int)),
++            this, SLOT(projectChanged(int)));
++    connect(m_editor->save, SIGNAL(clicked()), this, SLOT(save()));
++    connect(m_editor->create, SIGNAL(clicked()), this, SLOT(create()));
++    connect(m_editor->deleteProject, SIGNAL(clicked()), this, SLOT(deleteProject()));
++
++    connect(m_editor->publish, SIGNAL(clicked()), this, SLOT(publish()));
++    connect(m_editor->refreshPublishers, SIGNAL(clicked()), this, SLOT(refreshPublishers()));
++
++    // build service / job page
++    connect(m_editor->build, SIGNAL(clicked()), this, SLOT(createBuildServiceJob()));
++    connect(m_editor->cancelJob, SIGNAL(clicked()), this, SLOT(cancelBuildServiceJob()));
++    connect(m_editor->updateJob, SIGNAL(clicked()), this, SLOT(updateCurrentProject()));
++    connect(m_editor->buildServices, SIGNAL(currentIndexChanged(int)), this, SLOT(selectedBuildServiceChanged(int)));
++    connect(m_editor->buildServiceJobs, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(buildServiceJobSelected(QListWidgetItem*,QListWidgetItem*)));
++    connect(m_editor->shofullbuildoutput, SIGNAL(clicked()), this, SLOT(buildServiceJobFullDetailsRequested()));
++
++    // Accounts
++    connect(m_editor->accounts, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(remoteAccountChosen(QListWidgetItem*,QListWidgetItem*)));
++    connect(m_editor->saveAccount, SIGNAL(clicked()), this, SLOT(saveRemoteAccount()));
++    connect(m_editor->createAccount, SIGNAL(clicked()), this, SLOT(createRemoteAccount()));
++    connect(m_editor->deleteAccount, SIGNAL(clicked()), this, SLOT(deleteRemoteAccount()));
++
++    // Upload
++    connect(m_filesModel, SIGNAL(projectPathChanged(const QString&)), m_editor->projectPath, SLOT(setText(const QString&)));
++    connect(m_editor->upload, SIGNAL(clicked()), this, SLOT(createTarball()));
++    // Publishing
++    connect(m_editor->publish, SIGNAL(clicked()), this, SLOT(publish()));
++
++    initOcs();
++}
(2447 more lines skipped)

++++++ debian.tar.gz
--- changelog
+++ changelog
@@ -1,3 +1,14 @@
+qtcreator (2.1.0~rc1-3) unstable; urgency=low
+
+  * Add ftbfs_missing_webkit.patch to fix a build failure against Qt built with
+    QtWebKit module.
+  * Add ftbfs_allow-shlib-undefined_no-undefined.patch to fix a build failure
+    caused by some linker flags.
+  * Add buildservice_plugin_20101217.patch to enable OBS plugin.
+  * Add libattica-dev build dependency to build the OBS plugin.
+
+ -- Fathi Boudra <fathi.boudra at nokia.com>  Tue, 21 Dec 2010 12:53:43 +0200
+
 qtcreator (2.1.0~rc1-2) unstable; urgency=low
 
   * Update MeeGo SDK patch: use devrootsh instead of sudo.
--- control
+++ control
@@ -2,7 +2,7 @@
 Section: devel
 Priority: optional
 Maintainer: Fathi Boudra <fathi.boudra at nokia.com>
-Build-Depends: debhelper (>= 7.0.50~), quilt, sharutils,
+Build-Depends: debhelper (>= 7.0.50~), quilt, sharutils, libattica-dev,
  meego-sdk-libqt4-dev (>= 4.7.1), meego-sdk-qt4-dev-tools (>= 4.7.1)
 Standards-Version: 3.8.0
 Homepage: http://www.qtsoftware.com/developer/qt-creator
--- meego-sdk-qtcreator.install
+++ meego-sdk-qtcreator.install
@@ -13,6 +13,7 @@
 opt/meego/meego-sdk-qt-creator/lib/qtcreator/libsymbianutils.*
 opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/BinEditor.pluginspec
 opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/Bookmarks.pluginspec
+opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/BuildService.pluginspec
 opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/CMakeProjectManager.pluginspec
 opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/CVS.pluginspec
 opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/ClassView.pluginspec
@@ -46,6 +47,7 @@
 opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/Welcome.pluginspec
 opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/libBinEditor.so
 opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/libBookmarks.so
+opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/libBuildService.so
 opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/libCMakeProjectManager.so
 opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/libCVS.so
 opt/meego/meego-sdk-qt-creator/lib/qtcreator/plugins/Nokia/libClassView.so
--- patches/02_use_x-terminal-emulator.diff
+++ patches/02_use_x-terminal-emulator.diff
@@ -3,7 +3,7 @@
 
 --- a/src/libs/utils/consoleprocess_unix.cpp
 +++ b/src/libs/utils/consoleprocess_unix.cpp
-@@ -241,7 +241,7 @@ QString ConsoleProcess::defaultTerminalE
+@@ -292,7 +292,7 @@ QString ConsoleProcess::defaultTerminalE
      return QDir::cleanPath(QCoreApplication::applicationDirPath()
                             + QLatin1String("/../Resources/runInTerminal.command"));
  #else
--- patches/04_append_Debian_search_path_for_pre-built_gdbmacros.diff
+++ patches/04_append_Debian_search_path_for_pre-built_gdbmacros.diff
@@ -3,7 +3,7 @@
 
 --- a/src/plugins/projectexplorer/debugginghelper.cpp
 +++ b/src/plugins/projectexplorer/debugginghelper.cpp
-@@ -66,6 +66,14 @@ QStringList DebuggingHelperLibrary::debu
+@@ -60,6 +60,14 @@ QStringList DebuggingHelperLibrary::debu
              << (qtInstallData + QLatin1String("/qtc-debugging-helper/"))
              << QDir::cleanPath((QCoreApplication::applicationDirPath() + QLatin1String("/../qtc-debugging-helper/") + QString::number(hash))) + slash
              << (QDesktopServices::storageLocation(QDesktopServices::DataLocation) + QLatin1String("/qtc-debugging-helper/") + QString::number(hash)) + slash;
--- patches/buildservice_plugin_20101217.patch
+++ patches/buildservice_plugin_20101217.patch
+--- /dev/null
++++ b/src/plugins/buildservice/BuildService.pluginspec
+@@ -0,0 +1,17 @@
++<plugin name="BuildService" version="2.0.80" compatVersion="2.0.80">
++    <vendor>open-slx</vendor>
++    <copyright>2010 open-slx; 2010 Sebastian Kügler</copyright>
++    <license>
++GNU Lesser General Public License Usage
++
++This plugin may be used under the terms of the GNU Lesser
++General Public License version 2.1 as published by the Free Software
++Foundation.  Please review the following information to
++ensure the GNU Lesser General Public License version 2.1 requirements
++will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
++    <description>Buildservice integration for Qt Creator</description>
++    <url>http://www.open-slx.com</url>
++    <dependencyList>
++        <dependency name="Core" version="2.0.0"/>
++    </dependencyList>
++</plugin>
+--- /dev/null
++++ b/src/plugins/buildservice/buildservice-standalone.pro
+@@ -0,0 +1,15 @@
++TEMPLATE = app
++
++CONFIG += link_pkgconfig
++
++PKGCONFIG += libattica
++QT += webkit
++HEADERS += buildservicemanager.h \
++           checkablefilesystemmodel.h
++
++SOURCES += main.cpp \
++           buildservicemanager.cpp \
++           checkablefilesystemmodel.cpp
++
++FORMS += editproject.ui
++
+--- /dev/null
++++ b/src/plugins/buildservice/buildservice.pro
+@@ -0,0 +1,25 @@
++TEMPLATE = lib
++TARGET = BuildService
++
++include(../../qtcreatorplugin.pri)
++include(../../plugins/coreplugin/coreplugin.pri)
++include(../../plugins/projectexplorer/projectexplorer.pri)
++
++CONFIG += link_pkgconfig
++QT += webkit
++PKGCONFIG += libattica
++
++HEADERS += buildserviceplugin.h \
++           buildservicemanager.h \
++           checkablefilesystemmodel.h \
++    getcredentials.h
++
++SOURCES += buildserviceplugin.cpp \
++           buildservicemanager.cpp \
++           checkablefilesystemmodel.cpp \
++    getcredentials.cpp
++
++FORMS += editproject.ui \
++    getcredentials.ui
++
++OTHER_FILES += BuildService.pluginspec
+--- /dev/null
++++ b/src/plugins/buildservice/buildservicemanager.cpp
+@@ -0,0 +1,1063 @@
++/**************************************************************************
++**
++** This file is part of Qt Creator
++**
++** Copyright 2010 open-slx: <sebas at open-slx.com>
++**
++** GNU Lesser General Public License Usage
++**
++** This file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file.  Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** If you are unsure which license is appropriate for your use, please
++** contact the sales department at http://www.qtsoftware.com/contact.
++**
++**************************************************************************/
++
++// Own
++#include "buildservicemanager.h"
++#include "getcredentials.h"
++
++// Qt
++#include <QtCore/QDebug>
++#include <QtCore/QFile>
++#include <QtCore/QFileInfo>
++#include <QtGui/QLabel>
++#include <QtGui/QListWidgetItem>
++#include <QtGui/QMenu>
++#include <QtGui/QMenuBar>
++#include <QtGui/QMessageBox>
++#include <QtGui/QTextBrowser>
++#include <QtCore/QProcess>
++#include <QtGui/QVBoxLayout>
++
++// libattica
++#include <attica/itemjob.h>
++#include <attica/buildservice.h>
++#include <attica/buildservicejob.h>
++#include <attica/buildservicejoboutput.h>
++#include <attica/listjob.h>
++#include <attica/provider.h>
++#include <attica/project.h>
++#include <attica/publisher.h>
++#include <attica/remoteaccount.h>
++
++using namespace Attica;
++
++BuildServiceManager::BuildServiceManager(QWidget * parent, Qt::WindowFlags f) : QDialog(parent, f),
++    m_mainWidget(0)
++{
++//    QVBoxLayout *layout = new QVBoxLayout(this);
++//    setLayout(layout);
++//    setModal(false);
++
++//    m_mainWidget = new QWidget(this);
++//    layout->addWidget(m_mainWidget);
++    m_editor = new Ui::EditProject();
++    m_editor->setupUi(this);
++
++    m_filesModel = new CheckableFileSystemModel(this);
++    m_editor->treeView->setModel(m_filesModel);
++    setProjectPath(QDir::homePath());
++    m_editor->welcome->setHtml(tr("<h3>Build Service</h3> \
++<p>This plugin allows you to upload your project to a build service. \
++In order to publish your project, you can follow some simple steps:\
++<ol>\
++<li>\
++<b>Manage Accounts</b> In order to submit your project to a build service \
++under your account, please enter login information for the build service(s) \
++you would like to use.\
++</li>\
++<li>\
++<b>Register your Projects</b> The next page allows you to enter meta-information \
++necessary for your project, so it can be supplied to different buildservices.\
++</li>\
++<li>\
++<b>Upload your Code</b> or update before you start the build jobs on the build \
++service. \
++</li>\
++<li>\
++<b>Create a Build Job</b> Now you can submit your project as build job to one \
++or more build services. You can keep track of your builds on the <i>Build</i> \
++page.\
++</li>\
++<li>\
++<b>Publish your Project</b> The final step is to publish your application, \
++so it can be downloaded by others.\
++</li>\
++</ol>\
++\
++All this information will be stored on your Open Collaboration Server, so you \
++can access this information from any machine.</p>"));
++
++    setWindowTitle(tr("Buildservice Manager"));
++    // Project page
++    connect(m_editor->projectsCombo, SIGNAL(currentIndexChanged(int)),
++            this, SLOT(projectChanged(int)));
++    connect(m_editor->save, SIGNAL(clicked()), this, SLOT(save()));
++    connect(m_editor->create, SIGNAL(clicked()), this, SLOT(create()));
++    connect(m_editor->deleteProject, SIGNAL(clicked()), this, SLOT(deleteProject()));
++
++    connect(m_editor->publish, SIGNAL(clicked()), this, SLOT(publish()));
++    connect(m_editor->refreshPublishers, SIGNAL(clicked()), this, SLOT(refreshPublishers()));
++
++    // build service / job page
++    connect(m_editor->build, SIGNAL(clicked()), this, SLOT(createBuildServiceJob()));
++    connect(m_editor->cancelJob, SIGNAL(clicked()), this, SLOT(cancelBuildServiceJob()));
++    connect(m_editor->updateJob, SIGNAL(clicked()), this, SLOT(updateCurrentProject()));
++    connect(m_editor->buildServices, SIGNAL(currentIndexChanged(int)), this, SLOT(selectedBuildServiceChanged(int)));
++    connect(m_editor->buildServiceJobs, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(buildServiceJobSelected(QListWidgetItem*,QListWidgetItem*)));
++    connect(m_editor->shofullbuildoutput, SIGNAL(clicked()), this, SLOT(buildServiceJobFullDetailsRequested()));
++
++    // Accounts
++    connect(m_editor->accounts, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(remoteAccountChosen(QListWidgetItem*,QListWidgetItem*)));
++    connect(m_editor->saveAccount, SIGNAL(clicked()), this, SLOT(saveRemoteAccount()));
++    connect(m_editor->createAccount, SIGNAL(clicked()), this, SLOT(createRemoteAccount()));
++    connect(m_editor->deleteAccount, SIGNAL(clicked()), this, SLOT(deleteRemoteAccount()));
++
++    // Upload
++    connect(m_filesModel, SIGNAL(projectPathChanged(const QString&)), m_editor->projectPath, SLOT(setText(const QString&)));
++    connect(m_editor->upload, SIGNAL(clicked()), this, SLOT(createTarball()));
++    // Publishing
++    connect(m_editor->publish, SIGNAL(clicked()), this, SLOT(publish()));
++
++    initOcs();
++}
++
++BuildServiceManager::~BuildServiceManager()
++{}
++
++void BuildServiceManager::initOcs()
++{
++    m_pm.setAuthenticationSuppressed(true);
++    connect(&m_pm, SIGNAL(providerAdded(const Attica::Provider&)), SLOT(providerAdded(const Attica::Provider&)));
++
++    // This little hack ensures that we at least have a provider defined. This allows us to
++    // not have to worry so much about the platform information. This will continue to work
++    // when a platform plugin is created for non-KDE systems.
++    if(m_pm.defaultProviderFiles().count() == 0) {
++        m_pm.addProviderFile(QUrl("http://download.kde.org/ocs/providers.xml"));
++    } else {
++        m_pm.loadDefaultProviders();
++    }
++    this->setEnabled(false);
++    setStatus(tr("Loading providers..."));
++}
++
++void BuildServiceManager::providerAdded(const Attica::Provider& provider)
++{
++    //qDebug() << "providerAdded" << provider.baseUrl();
++    setStatus(tr("Provider found:") + provider.baseUrl().toString());
++    this->setEnabled(true);
++
++    if (provider.isValid()) {
++        QString _id = "1";
++        m_provider = provider;
++
++        if(m_pm.defaultProviderFiles().count() == 0) {
++            QStringList creds = getCredentials();
++            if(creds.isEmpty()) {
++                // We really do need those credentials, so if we're not given any, die out
++                close();
++            } else if(creds.at(0)=="" || creds.at(1)=="") {
++                // We really, REALLY do need those credentials, so if we're not given any, die out
++                close();
++            } else {
++                m_provider.saveCredentials(creds.at(0), creds.at(1));
++            }
++        }
++        // TODO: We ought to be checking the login here. The current code simply assumes that
++        // the user entered correct credentials. It will not break particularly horribly, but
++        // it is kind of unpretty.
++
++        // Populate the UI from the OCS server
++        getProject(_id);
++        listProjects();
++        listBuildServices();
++        refreshPublishers();
++        listRemoteAccounts();
++
++        Project p;
++        p.setId(_id);
++        listBuildServiceJobs(p);
++    }
++}
++
++QStringList BuildServiceManager::getCredentials()
++{
++    QStringList credentials;
++
++    getcredentials dlg;
++    dlg.exec();
++    if(dlg.result()==QDialog::Accepted) {
++        credentials << dlg.credentials();
++    }
++
++    return credentials;
++}
++
++void BuildServiceManager::getProject(QString id)
++{
++    ItemJob<Project>* job = m_provider.requestProject(id);
++    connect(job, SIGNAL(finished(Attica::BaseJob*)), SLOT(projectResult(Attica::BaseJob*)));
++    job->start();
++    this->setEnabled(false);
++}
++
++void BuildServiceManager::listProjects()
++{
++    ListJob<Project>* job = m_provider.requestProjects();
++    connect(job, SIGNAL(finished(Attica::BaseJob*)), SLOT(projectListResult(Attica::BaseJob*)));
++    job->start();
++}
++
++void BuildServiceManager::listBuildServices()
++{
++    ListJob<BuildService>* job = m_provider.requestBuildServices();
++    connect(job, SIGNAL(finished(Attica::BaseJob*)), SLOT(buildServiceListResult(Attica::BaseJob*)));
++    job->start();
++}
++
++void BuildServiceManager::refreshPublishers()
++{
++    ListJob<Publisher>* job = m_provider.requestPublishers();
++    connect(job, SIGNAL(finished(Attica::BaseJob*)), SLOT(publisherListResult(Attica::BaseJob*)));
++    job->start();
++}
++
++void BuildServiceManager::publish()
++{
++    QListWidgetItem* buildJobItem = m_editor->completedBuilds->currentItem();
++    QListWidgetItem* publisherItem = m_editor->publishers->currentItem();
++    if (!buildJobItem || !publisherItem) {
++        setStatus(tr("Error: Please select a job and a publisher."));
++        return;
++    }
++
++    BuildServiceJob bsj = m_buildServiceJobs[buildJobItem->data(Qt::UserRole).toString()];
++    Publisher pub = m_publishers[publisherItem->data(Qt::UserRole).toString()];
++
++    qDebug() << "Publishing (job / publisher)" << bsj.id() << pub.id();
++    PostJob* job = m_provider.publishBuildJob(bsj, pub);
++    connect(job, SIGNAL(finished(Attica::BaseJob*)), this, SLOT(publishFinished(Attica::BaseJob*)));
++    job->start();
++}
++
++void  BuildServiceManager::publishFinished(Attica::BaseJob* j)
++{
++    //qDebug() << "project published!";
++    if (j->metadata().error() == Metadata::NoError) {
++        setStatus(tr("Project published."));
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        setStatus(tr("OCS Error: %1").arg(j->metadata().message()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        setStatus(tr("Network Error: %1").arg(j->metadata().message()));
++    } else {
++        setStatus(tr("Unknown Error: %1").arg(j->metadata().message()));
++    }
++}
++
++void BuildServiceManager::listBuildServiceJobs(const Project &p)
++{
++    ListJob<BuildServiceJob>* job = m_provider.requestBuildServiceJobs(p);
++    connect(job, SIGNAL(finished(Attica::BaseJob*)), SLOT(buildServiceJobListResult(Attica::BaseJob*)));
++    job->start();
++}
++
++void BuildServiceManager::listRemoteAccounts()
++{
++    ListJob<RemoteAccount>* job = m_provider.requestRemoteAccounts();
++    connect(job, SIGNAL(finished(Attica::BaseJob*)), SLOT(remoteAccountListResult(Attica::BaseJob*)));
++    job->start();
++}
++
++void BuildServiceManager::projectResult(Attica::BaseJob* j)
++{
++    //qDebug() << "Project job returned";
++    QString output;
++    this->setEnabled(true);
++
++    if (j->metadata().error() == Metadata::NoError) {
++        Attica::ItemJob<Project> *itemJob = static_cast<Attica::ItemJob<Project> *>( j );
++        Attica::Project p = itemJob->result();
++        setStatus(tr("Project loaded."));
++        projectToUi(p);
++        // Save the user some confusion when switching between projects, update the various
++        // other lists in the UI
++        updateCurrentProject();
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        setStatus(tr("OCS Error: %1").arg(j->metadata().message()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        setStatus(tr("Network Error: %1").arg(j->metadata().message()));
++    } else {
++        setStatus(tr("Unknown Error: %1").arg(j->metadata().message()));
++    }
++}
++
++void BuildServiceManager::projectChanged(int index)
++{
++    QString pid = m_editor->projectsCombo->itemData(index).toString();
++
++    getProject(pid);
++}
++
++void BuildServiceManager::projectToUi(const Project& p)
++{
++    m_editor->id->setText(p.id());
++    m_editor->name->setText(p.name());
++    m_editor->description->setText(p.description());
++    m_editor->url->setText(p.url());
++    m_editor->summary->setText(p.summary());
++    m_editor->developers->setText(p.developers().join(", "));
++    m_editor->license->setText(p.license());
++    m_editor->version->setText(p.version());
++    m_editor->requirements->setText(p.requirements());
++    m_editor->specFile->setPlainText(p.specFile());
++}
++
++Project BuildServiceManager::uiToProject()
++{
++    //qDebug() << "Saving project";
++
++    Project project = Project();
++
++    project.setId(m_editor->id->text());
++    project.setName(m_editor->name->text());
++    project.setVersion(m_editor->version->text());
++    project.setLicense(m_editor->license->text());
++    project.setUrl(m_editor->url->text());
++    QStringList _d = m_editor->developers->text().split(',');
++    QStringList devs;
++    foreach (QString dev, _d) {
++        devs << dev.trimmed();
++    }
++    project.setDevelopers(devs);
++    project.setSummary(m_editor->summary->text());
++    project.setDescription(m_editor->description->text());
++    project.setRequirements(m_editor->requirements->text());
++    project.setSpecFile(m_editor->specFile->toPlainText());
++
++    return project;
++}
++
++void BuildServiceManager::save()
++{
++    Attica::PostJob* postjob = m_provider.editProject(uiToProject());
++    connect(postjob, SIGNAL(finished(Attica::BaseJob*)), SLOT(saveProjectResult(Attica::BaseJob*)));
++    postjob->start();
++    this->setEnabled(false);
++}
++
++void BuildServiceManager::create()
++{
++    Attica::PostJob* postjob = m_provider.createProject(uiToProject());
++    connect(postjob, SIGNAL(finished(Attica::BaseJob*)), SLOT(createProjectResult(Attica::BaseJob*)));
++    postjob->start();
++    this->setEnabled(false);
++}
++
++void BuildServiceManager::deleteProject()
++{
++    Attica::PostJob* postjob = m_provider.deleteProject(uiToProject());
++    connect(postjob, SIGNAL(finished(Attica::BaseJob*)), SLOT(deleteProjectResult(Attica::BaseJob*)));
++    postjob->start();
++    this->setEnabled(false);
++}
++
++void BuildServiceManager::createProjectResult(Attica::BaseJob* j)
++{
++    //qDebug() << "createProject() job returned";
++    QString output;
++    this->setEnabled(true);
++
++    if (j->metadata().error() == Metadata::NoError) {
++        //Attica::PostJob* postjob = static_cast<Attica::PostJob*>(j);
++        m_currentProjectId = j->metadata().resultingId();
++        qDebug() << "project created, resulting ID:" << m_currentProjectId;
++        output.append(QString("Project [%1] created.").arg(m_currentProjectId));
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(QString("OCS Error: %1").arg(j->metadata().message()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(QString("Network Error: %1").arg(j->metadata().message()));
++    } else {
++        output.append(QString("Unknown Error: %1").arg(j->metadata().message()));
++    }
++    setStatus(output);
++    listProjects();
++}
++
++void BuildServiceManager::saveProjectResult(Attica::BaseJob* j)
++{
++    //qDebug() << "editProject() job returned";
++    QString output;
++    this->setEnabled(true);
++
++    if (j->metadata().error() == Metadata::NoError) {
++        m_currentProjectId = j->metadata().resultingId();
++        qDebug() << "project saved ID:" << m_currentProjectId;
++        output.append(QString("Project [%1] saved.").arg(m_currentProjectId));
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    setStatus(output);
++    listProjects();
++}
++
++void BuildServiceManager::deleteProjectResult(Attica::BaseJob* j)
++{
++    //qDebug() << "deleteProject() job returned";
++    QString output;
++    this->setEnabled(true);
++
++    if (j->metadata().error() == Metadata::NoError) {
++        //qDebug() << "project deleted.";
++        output.append(tr("Project deleted."));
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    setStatus(output);
++    m_currentProjectId = QString();
++    projectToUi(Project());
++    listProjects();
++}
++
++void BuildServiceManager::projectListResult(Attica::BaseJob* j)
++{
++    qDebug() << "Project list job returned";
++    QString output = "<b>Projects:</b>";
++    this->setEnabled(true);
++
++    if (j->metadata().error() == Metadata::NoError) {
++        Attica::ListJob<Project> *listJob = static_cast<Attica::ListJob<Project> *>( j );
++        qDebug() << "Yay, no errors ...";
++        QStringList projectIds;
++        m_editor->projectsCombo->clear();
++        foreach (const Project& p, listJob->itemList()) {
++            m_projects[p.id()] = p;
++            qDebug() << "New project:" << p.id() << p.name();
++            output.append(tr("Projects loaded."));
++            projectIds << p.id();
++            m_editor->projectsCombo->addItem(p.name(), p.id());
++        }
++        if (!listJob->itemList().count()) {
++            output.append("No Projects found.");
++        }
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    //qDebug() << output;
++    //setStatus(output);
++}
++
++void BuildServiceManager::buildServiceListResult(Attica::BaseJob* j)
++{
++    qDebug() << "BuildService list job returned";
++    QString output = "<b>BuildServices:</b>";
++    this->setEnabled(true); // fixme: tab
++
++    if (j->metadata().error() == Metadata::NoError) {
++        Attica::ListJob<BuildService> *listJob = static_cast<Attica::ListJob<BuildService> *>( j );
++        qDebug() << "Yay, no errors ...";
++
++        //m_editor->accountsServers->addItem();
++        foreach (const BuildService& bs, listJob->itemList()) {
++            m_buildServices[bs.id()] = bs;
++            qDebug() << "New OBS:" << bs.id() << bs.name() << bs.url();
++            output.append(tr("Build services loaded."));
++//            QListWidgetItem* new_bs = new QListWidgetItem(bs.name(), m_editor->buildServices);
++//            new_bs->setData(Qt::UserRole, QVariant(bs.id()));
++
++            m_editor->buildServices->addItem(bs.name(), bs.id());
++            m_editor->accountsServers->addItem(bs.name(), QStringList() << bs.id() << "1");
++            //QListWidgetItem* new_bsa = new QListWidgetItem(bs.name(), m_editor->accountsServers);
++            //new_bsa->setData(Qt::UserRole, QVariant(bs.id()));
++
++        }
++        if (!listJob->itemList().count()) {
++            output.append("No build services found.");
++        }
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    //setStatus(output);
++    //qDebug() << output;
++    //setBuildStatus(output);
++}
++
++void BuildServiceManager::publisherListResult(Attica::BaseJob* j)
++{
++    qDebug() << "publisher list job returned";
++    this->setEnabled(true); // fixme: tab
++    QString output;
++    if (j->metadata().error() == Metadata::NoError) {
++        Attica::ListJob<Publisher> *listJob = static_cast<Attica::ListJob<Publisher> *>( j );
++        qDebug() << "Yay, no errors ...";
++        m_publishers.clear();
++        m_editor->publishers->clear();
++        foreach (const Publisher& publisher, listJob->itemList()) {
++            m_publishers[publisher.id()] = publisher;
++            qDebug() << "New publisher:" << publisher.id() << publisher.name() << publisher.url();
++            output.append(tr("Publisher loaded."));
++            QListWidgetItem* new_publisher = new QListWidgetItem(publisher.name(), m_editor->publishers);
++            new_publisher->setData(Qt::UserRole, QVariant(publisher.id()));
++
++            m_editor->accountsServers->addItem(publisher.name(), QStringList() << publisher.id() << "2");
++            //QListWidgetItem* new_bsa = new QListWidgetItem(bs.name(), m_editor->accountsServers);
++            //new_bsa->setData(Qt::UserRole, QVariant(bs.id()));
++
++        }
++        if (!listJob->itemList().count()) {
++            output.append("No publishers found.");
++        }
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    //setStatus(output);
++    //qDebug() << output;
++    //setBuildStatus(output);
++}
++
++void BuildServiceManager::buildServiceJobListResult(Attica::BaseJob* j)
++{
++    qDebug() << "BuildServiceJobList list job returned";
++    QString output = "<b>BuildServiceJobs: </b>";
++    this->setEnabled(true); // fixme: tab
++
++    if (j->metadata().error() == Metadata::NoError) {
++        m_editor->completedBuilds->clear();
++        m_editor->buildServiceJobs->clear();
++        m_editor->buildjobinfo->setVisible(false);
++        Attica::ListJob<BuildServiceJob> *listJob = static_cast<Attica::ListJob<BuildServiceJob> *>( j );
++        qDebug() << "Yay, no errors. Items found:" << listJob->itemList().count();
++
++        foreach (const BuildServiceJob& bsj, listJob->itemList()) {
++            m_buildServiceJobs[bsj.id()] = bsj;
++            qDebug() << "New BuildServiceJob:" << bsj.id() << bsj.name() << bsj.target() << bsj.progress();
++            //output.append(QString("<br />%1 (%2) for %3").arg(bsj.name(), bsj.id(), bsj.target()));
++            QString progress;
++            if (bsj.isFailed()) {
++                progress = tr("Failed");
++            } else if (bsj.isCompleted()) {
++                progress = tr("Completed");
++            } else {
++                progress = QString("Running [%1\%]").arg((int)(bsj.progress()*100));
++            }
++            QString itemText = tr("%1 (%2)").arg(bsj.name(), progress);
++            QListWidgetItem* new_bsj = new QListWidgetItem(itemText, m_editor->buildServiceJobs);
++            new_bsj->setData(Qt::UserRole, QVariant(bsj.id()));
++
++            if (!bsj.isCompleted()) {
++                QListWidgetItem* complete_bsj = new QListWidgetItem(itemText, m_editor->completedBuilds);
++                complete_bsj->setData(Qt::UserRole, QVariant(bsj.id()));
++            }
++        }
++
++        if (!listJob->itemList().count()) {
++            output.append("No jobs found.");
++        } else {
++            output.append(tr("Build service jobs loaded."));
++
++        }
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    //setStatus(output);
++    //qDebug() << output;
++    //setBuildStatus(output);
++}
++
++void BuildServiceManager::remoteAccountListResult(Attica::BaseJob* j)
++{
++    this->setEnabled(true);
++
++    QString output;
++    if (j->metadata().error() == Metadata::NoError) {
++        Attica::ListJob<RemoteAccount> *listJob = static_cast<Attica::ListJob<RemoteAccount> *>( j );
++        qDebug() << "Yay, no errors ...";
++
++        foreach (const RemoteAccount& p, listJob->itemList()) {
++            QString serviceName;
++            if (p.type()==QLatin1String("1")) {
++                serviceName = m_buildServices.value(p.remoteServiceId()).name();
++                // The buildservice IDs are basically human readable and don't need the assistance.
++                // The fact we need the check is annoying, but it does make for slightly prettier lists anyway
++                if (serviceName.isEmpty()) {
++                    serviceName = p.remoteServiceId();
++                }
++            } else if (p.type()==QLatin1String("2")) {
++                serviceName = m_publishers.value(p.remoteServiceId()).name();
++                if (serviceName.isEmpty()) {
++                    serviceName = tr("Publisher: ").append(p.remoteServiceId());
++                }
++            }
++            QString name = QString("%1 (%2)").arg(p.login(), serviceName);
++            m_accounts[name] = p.id();
++            qDebug() << "New Account:" << p.id() << name;
++            m_editor->accounts->addItem(name);
++        }
++        if (!listJob->itemList().count()) {
++            setStatus(tr("No remote accounts found."));
++        } else {
++            setStatus(tr("Accounts loaded."));
++        }
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    //qDebug() << output;
++    //setStatus(output);
++}
++
++void BuildServiceManager::saveRemoteAccount()
++{
++    qDebug() << "Creating remote account";
++    // FIXME: implement
++
++    QListWidgetItem *current = m_editor->accounts->currentItem();
++    if (current) {
++
++        RemoteAccount account = RemoteAccount();
++        account.setId(m_accounts[current->text()]);
++        account.setLogin(m_editor->username->text());
++        account.setPassword(m_editor->password->text());
++
++        Attica::PostJob* j = m_provider.editRemoteAccount(account);
++
++        connect(j, SIGNAL(finished(Attica::BaseJob*)), this, SLOT(remoteAccountEdited(Attica::BaseJob*)));
++        j->start();
++        setStatus(tr("Editing remote account."));
++    } else {
++        setStatus(tr("No account selected."));
++    }
++}
++
++void BuildServiceManager::createRemoteAccount()
++{
++    qDebug() << "Creating remote account for service: " 
++            << m_editor->accountsServers->itemData(m_editor->accountsServers->currentIndex()).toStringList().join(" ");
++    RemoteAccount account = RemoteAccount();
++    account.setLogin(m_editor->username->text());
++    account.setPassword(m_editor->password->text());
++
++    QStringList itemData = m_editor->accountsServers->itemData(m_editor->accountsServers->currentIndex()).toStringList();
++    account.setType(itemData[1]);
++    account.setRemoteServiceId(itemData[0]);
++
++    qDebug() << "BS:" << m_editor->accountsServers->currentIndex()
++             << m_editor->accountsServers->itemData(m_editor->accountsServers->currentIndex()).toString();
++    Attica::PostJob* j = m_provider.createRemoteAccount(account);
++    connect(j, SIGNAL(finished(Attica::BaseJob*)), this, SLOT(remoteAccountCreated(Attica::BaseJob*)));
++    j->start();
++    setStatus("Saving remote account.");
++}
++
++void BuildServiceManager::deleteRemoteAccount()
++{
++    QListWidgetItem *current = m_editor->accounts->currentItem();
++    if (current) {
++        QString _id = m_accounts[current->text()];
++        Attica::PostJob* j = m_provider.deleteRemoteAccount(_id);
++        connect(j, SIGNAL(finished(Attica::BaseJob*)), this, SLOT(remoteAccountDeleted(Attica::BaseJob*)));
++        j->start();
++        setStatus(tr("Deleting remote account."));
++    } else {
++        setStatus(tr("No account selected."));
++    }
++}
++
++
++void BuildServiceManager::selectedBuildServiceChanged( int newIndex )
++{
++    m_editor->targets->clear();
++    QList<Target> targetlist = m_buildServices[m_editor->buildServices->itemData(newIndex, Qt::UserRole).toString()].targets();
++    foreach (const Target& t, targetlist) {
++        m_editor->targets->addItem(t.name, t.id);
++    }
++}
++
++void BuildServiceManager::createBuildServiceJob()
++{
++    BuildServiceJob b = BuildServiceJob();
++    b.setProjectId(m_editor->projectsCombo->itemData(m_editor->projectsCombo->currentIndex()).toString());
++    b.setTarget(m_editor->targets->itemData(m_editor->targets->currentIndex()).toString());
++    b.setBuildServiceId(m_editor->buildServices->itemData(m_editor->buildServices->currentIndex(), Qt::UserRole).toString());
++
++    ///*
++    qDebug() << "Create build job:" << m_editor->targets->itemData(m_editor->targets->currentIndex()).toString() << m_editor->targets->currentIndex() << m_editor->targets->itemData(m_editor->targets->currentIndex());
++    qDebug() << "Project:" << b.projectId();
++    qDebug() << "Target:" << b.target();
++    qDebug() << "Buildservice:" << b.buildServiceId();
++    //*/
++    Attica::PostJob* j = m_provider.createBuildServiceJob(b);
++    connect(j, SIGNAL(finished(Attica::BaseJob*)), this, SLOT(buildServiceJobCreated(Attica::BaseJob*)));
++    j->start();
++    setStatus("Starting a build job on the server.");
++}
++
++void BuildServiceManager::cancelBuildServiceJob()
++{
++    const QString bsj_id = m_editor->buildServiceJobs->currentItem()->data(Qt::UserRole).toString();
++    qDebug() << "Cancelling build job:" << bsj_id;
++    BuildServiceJob b = BuildServiceJob();
++    b.setId(bsj_id);
++    Attica::PostJob* j = m_provider.cancelBuildServiceJob(b);
++    connect(j, SIGNAL(finished(Attica::BaseJob*)), this, SLOT(buildServiceJobCanceled(Attica::BaseJob*)));
++    j->start();
++}
++
++void BuildServiceManager::buildServiceJobCanceled(Attica::BaseJob* j)
++{
++    this->setEnabled(true); // fixme: tab
++    QString output;
++    if (j->metadata().error() == Metadata::NoError) {
++        qDebug() << "job canceled.";
++        // TODO: refresh jobs
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    qDebug() << output;
++    updateCurrentProject();
++    setStatus(output);
++}
++
++void BuildServiceManager::buildServiceJobCreated(Attica::BaseJob* j)
++{
++    this->setEnabled(true); // fixme: tab
++    QString output;
++    if (j->metadata().error() == Metadata::NoError) {
++        qDebug() << "job created. I think.";
++        // TODO: refresh jobs
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    qDebug() << "New BuildServiceJob created with ID:" << j->metadata().resultingId();
++    qDebug() << output;
++    updateCurrentProject();
++    setStatus(output);
++}
++
++void BuildServiceManager::buildServiceJobSelected(QListWidgetItem *current, QListWidgetItem *previous)
++{
++    Q_UNUSED(previous)
++    if(current)
++    {
++        this->setEnabled(false);
++        Attica::GetJob* j = m_provider.requestBuildServiceJob(current->data(Qt::UserRole).toString());
++        connect(j, SIGNAL(finished(Attica::BaseJob*)), this, SLOT(buildServiceJobDetailsReturned(Attica::BaseJob*)));
++        j->start();
++    }
++}
++
++void BuildServiceManager::buildServiceJobDetailsReturned(Attica::BaseJob *j)
++{
++    this->setEnabled(true); // fixme: tab
++    QString output;
++    if (j->metadata().error() == Metadata::NoError) {
++        Attica::ItemJob<BuildServiceJob> *itemJob = static_cast<Attica::ItemJob<BuildServiceJob> *>(j);
++        Attica::BuildServiceJob job = itemJob->result();
++        m_editor->buildjobinfo->setVisible(true);
++        m_editor->joburl->setText(QString("<a href=\"%1\">%2</a>").arg(job.url()).arg(tr("Buildservice Job")));
++        m_editor->jobbsname->setText(m_buildServices.value(job.buildServiceId()).name());
++        m_editor->jobmessage->setText(job.message());
++        setStatus(tr("Job details retrieved"));
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    setStatus(output);
++}
++
++void BuildServiceManager::buildServiceJobFullDetailsRequested()
++{
++    this->setEnabled(false); // fixme: tab
++
++    Attica::GetJob* j = m_provider.requestBuildServiceJobOutput(m_editor->buildServiceJobs->currentItem()->data(Qt::UserRole).toString());
++    connect(j, SIGNAL(finished(Attica::BaseJob*)), this, SLOT(buildServiceJobFullDetailsReturned(Attica::BaseJob*)));
++    j->start();
++}
++
++void BuildServiceManager::buildServiceJobFullDetailsReturned(Attica::BaseJob* j)
++{
++    this->setEnabled(true); // fixme: tab
++    QString output;
++    if (j->metadata().error() == Metadata::NoError) {
++        Attica::ItemJob<BuildServiceJobOutput> *itemJob = static_cast<Attica::ItemJob<BuildServiceJobOutput> *>(j);
++        Attica::BuildServiceJobOutput job = itemJob->result();
++
++        QDialog dlg(this);
++        dlg.setSizeGripEnabled(true);
++        QVBoxLayout* dlglayout = new QVBoxLayout(&dlg);
++        QTextBrowser* txtbrowser = new QTextBrowser(&dlg);
++        txtbrowser->setText(job.output());
++        dlglayout->addWidget(txtbrowser);
++        dlg.exec();
++
++        output.append(tr("Full job details retrieved"));
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    setStatus(output);
++}
++
++void BuildServiceManager::remoteAccountChosen(QListWidgetItem* current, QListWidgetItem* previous)
++{
++    Q_UNUSED(previous);
++    if(current) {
++        this->setEnabled(false); // fixme: tab
++        Attica::GetJob* j = m_provider.requestRemoteAccount(m_accounts[current->text()]);
++        connect(j, SIGNAL(finished(Attica::BaseJob*)), this, SLOT(remoteAccountChosenResult(Attica::BaseJob*)));
++        j->start();
++    } else {
++        m_editor->username->setText("");
++        m_editor->password->setText("");
++    }
++}
++
++void BuildServiceManager::remoteAccountChosenResult(Attica::BaseJob* j)
++{
++    this->setEnabled(true); // fixme: tab
++
++    if (j->metadata().error() == Metadata::NoError) {
++        Attica::ItemJob<RemoteAccount> *itemJob = static_cast<Attica::ItemJob<RemoteAccount> *>( j );
++        Attica::RemoteAccount p = itemJob->result();
++        m_editor->username->setText(p.login());
++        m_editor->password->setText(p.password());
++        setStatus(tr("Remote account information fetched"));
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        setStatus(tr("OCS Error: %1").arg(j->metadata().message()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        setStatus(tr("Network Error: %1").arg(j->metadata().message()));
++    } else {
++        setStatus(tr("Unknown Error: %1").arg(j->metadata().message()));
++    }
++}
++
++void BuildServiceManager::remoteAccountCreated(Attica::BaseJob* j)
++{
++    this->setEnabled(true); // fixme: tab
++    QString output;
++    if (j->metadata().error() == Metadata::NoError) {
++        qDebug() << "account created. I think.";
++        // TODO: refresh jobs
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    qDebug() << "New Account created with ID:" << j->metadata().resultingId();
++    qDebug() << output;
++    m_editor->accounts->clear();
++    listRemoteAccounts();
++    setStatus(output);
++}
++
++void BuildServiceManager::remoteAccountEdited(Attica::BaseJob* j)
++{
++    this->setEnabled(true); // fixme: tab
++    QString output;
++    if (j->metadata().error() == Metadata::NoError) {
++        output = tr("Account deleted.");
++        // TODO: refresh jobs
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    qDebug() << output;
++    m_editor->accounts->clear();
++    listRemoteAccounts();
++    setStatus(output);
++}
++
++void BuildServiceManager::remoteAccountDeleted(Attica::BaseJob* j)
++{
++    this->setEnabled(true); // fixme: tab
++    QString output;
++    if (j->metadata().error() == Metadata::NoError) {
++        output = tr("Account deleted.");
++        // TODO: refresh jobs
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    qDebug() << output;
++    m_editor->accounts->clear();
++    listRemoteAccounts();
++    setStatus(output);
++}
++
++
++void BuildServiceManager::setStatus(QString status)
++{
++    qDebug() << "[ii] Status:" << status;
++    m_editor->status->setText(status);
++}
++
++QString BuildServiceManager::currentProject()
++{
++    return m_editor->projectsCombo->itemData(m_editor->projectsCombo->currentIndex()).toString();
++}
++
++void BuildServiceManager::updateCurrentProject()
++{
++    m_editor->buildServiceJobs->clear();
++    m_editor->buildjobinfo->setVisible(false);
++    qDebug() << "Updating project ...";
++    Project p = Project();
++    p.setId(currentProject());
++    listBuildServiceJobs(p);
++}
++
++void BuildServiceManager::setProjectPath(const QString& path)
++{
++    qDebug() << "Seting project path: " << path;
++    QModelIndex index = m_filesModel->setRootPath(path);
++    m_editor->treeView->setRootIndex(index);
++}
++
++void BuildServiceManager::createTarball()
++{
++    QString zipFile = QDir::temp().absolutePath().append("/")
++                        .append(m_editor->projectsCombo->currentText())
++                        .append("-")
++                        .append(m_editor->version->text())
++                        .append(".zip");
++    QStringList projectPath = QStringList(m_editor->projectPath->text());
++    qDebug() << "Creating tarball from" << projectPath << " at " << zipFile;
++    createTarball(QString(zipFile), projectPath);
++}
++
++void BuildServiceManager::createTarball(const QString& tarFile, const QStringList& files)
++{
++    if (files.count() < 1) {
++        setStatus(tr("Please select a directory"));
++        return;
++    }
++    // We take the directory supplied, go to the parent directory and 
++    // zip up the whole project dir, then we upload the result, and remove
++    // the temporary zip file.
++    QDir fullDir = QDir(files.at(0));
++    QDir workingDir = fullDir;
++    workingDir.cdUp();
++    QString relativeDir = workingDir.relativeFilePath(fullDir.absolutePath());
++
++    m_tarballFileName = tarFile;
++    QStringList arguments = QStringList(relativeDir);
++    arguments.prepend("-r"); // For recursively zipping our project dir
++    arguments.prepend(tarFile);
++    QProcess* zip = new QProcess(this);
++    zip->setWorkingDirectory(workingDir.absolutePath());
++    connect(zip, SIGNAL(finished(int)), SLOT(tarballCreated(int)));
++    zip->start("zip", arguments);
++}
++
++void BuildServiceManager::tarballCreated(const int exitcode)
++{
++    qDebug() << "tarball created" << m_tarballFileName << exitcode;
++    if (!exitcode) {
++        setStatus(tr("Uploading your project..."));
++        uploadTarball(QString(), m_tarballFileName);
++    } else {
++        setStatus(tr("Something went wrong zipping the directory. Do you have the <i>zip</i> utility installed?"));
++    }
++}
++
++void BuildServiceManager::uploadTarball(const QString& index, const QString& path)
++{
++    Q_UNUSED( index );
++    qDebug() << "BuildServiceManager:uploadTarball: " << path;
++    QFile file(path);
++    if (!file.open(QIODevice::ReadOnly)) {
++        QMessageBox::warning(0, "Upload", QString("File not found: %1").arg(path));
++        return;
++    }
++    QString projectId = m_editor->id->text();
++    QByteArray fileContents;
++    fileContents.append(file.readAll());
++    file.close();
++
++    QString fileName = QFileInfo(path).fileName();
++
++    Attica::PostJob* job;
++    job = m_provider.uploadTarballToBuildService(projectId, fileName, fileContents);
++    connect(job, SIGNAL(finished(Attica::BaseJob*)), SLOT(tarballUploaded(Attica::BaseJob*)));
++    job->start();
++}
++
++void BuildServiceManager::tarballUploaded(Attica::BaseJob* j)
++{
++    QString output;
++    qDebug() << "Upload finished..." << m_tarballFileName;
++    if (j->metadata().error() == Metadata::NoError) {
++        output.append(tr("Sourcecode uploaded."));
++    } else if (j->metadata().error() == Metadata::OcsError) {
++        output.append(tr("Server Error: ", j->metadata().message().toAscii()));
++    } else if (j->metadata().error() == Metadata::NetworkError) {
++        output.append(tr("Network Error: ", j->metadata().message().toAscii()));
++    } else {
++        output.append(tr("Unknown Error: ", j->metadata().message().toAscii()));
++    }
++    setStatus(output);
++
++    // Delete temporary file
++    QFile rm(m_tarballFileName);
++    rm.remove();
++}
++
++
++
++#include "moc_buildservicemanager.cpp"
++
+--- /dev/null
++++ b/src/plugins/buildservice/buildservicemanager.h
+@@ -0,0 +1,134 @@
++/**************************************************************************
++**
++** This file is part of Qt Creator
++**
++** Copyright 2010 open-slx: <sebas at open-slx.com>
++**
++** GNU Lesser General Public License Usage
++**
++** This file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file.  Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** If you are unsure which license is appropriate for your use, please
++** contact the sales department at http://www.qtsoftware.com/contact.
++**
++**************************************************************************/
++
++#ifndef BUILDSERVICEMANAGER_H
++#define BUILDSERVICEMANAGER_H
++
++
++#include <QtGui/QDialog>
++#include <QtGui/QFileSystemModel>
++#include <QtGui/QLabel>
++
++#include <attica/providermanager.h>
++#include <attica/project.h>
++
++namespace Attica {
++    class Project;
++    class RemoteAccount;
++    class BaseJob;
++    class Provider;
++    class Publisher;
++}
++
++#include "ui_editproject.h"
++#include "checkablefilesystemmodel.h"
++
++
++class BuildServiceManager : public QDialog
++{
++Q_OBJECT
++public:
++    BuildServiceManager(QWidget * parent = 0, Qt::WindowFlags f = 0);
++    virtual ~BuildServiceManager();
++
++private Q_SLOTS:
++    void providerAdded(const Attica::Provider& provider);
++
++    void publish();
++    void projectChanged(int);
++    void saveRemoteAccount();
++    void createRemoteAccount();
++    void deleteRemoteAccount();
++    void updateCurrentProject();
++    void listProjects();
++    void save();
++    void create();
++    void deleteProject(); // don't clash with keyword
++    void listRemoteAccounts();
++    void listBuildServices();
++    void refreshPublishers();
++
++    void projectListResult(Attica::BaseJob*);
++    void remoteAccountListResult(Attica::BaseJob*);
++    void projectResult(Attica::BaseJob*);
++    void createProjectResult(Attica::BaseJob* j);
++    void saveProjectResult(Attica::BaseJob* j);
++    void deleteProjectResult(Attica::BaseJob* j);
++    void publishFinished(Attica::BaseJob*);
++    void remoteAccountChosen(QListWidgetItem* current,QListWidgetItem* previous);
++    void remoteAccountChosenResult(Attica::BaseJob*);
++    void remoteAccountCreated(Attica::BaseJob* j);
++    void remoteAccountEdited(Attica::BaseJob* j);
++    void remoteAccountDeleted(Attica::BaseJob* j);
++    void buildServiceListResult(Attica::BaseJob*);
++    void publisherListResult(Attica::BaseJob*);
++    void buildServiceJobListResult(Attica::BaseJob*);
++
++    void createTarball();
++    void createTarball(const QString& tarFile, const QStringList& files);
++    void tarballCreated(const int);
++    void uploadTarball(const QString& index, const QString& path);
++    void tarballUploaded(Attica::BaseJob* job);
++
++    void selectedBuildServiceChanged(int newIndex);
++    void createBuildServiceJob();
++    void buildServiceJobCreated(Attica::BaseJob* j);
++    void cancelBuildServiceJob();
++    void buildServiceJobCanceled(Attica::BaseJob* j);
++    void buildServiceJobSelected(QListWidgetItem* current,QListWidgetItem* previous);
++    void buildServiceJobDetailsReturned(Attica::BaseJob* j);
++    void buildServiceJobFullDetailsRequested();
++    void buildServiceJobFullDetailsReturned(Attica::BaseJob* j);
++
++
++private:
++    void initOcs();
++    QStringList getCredentials();
++    void getProject(QString id);
++    void deleteProject(QString id);
++    void listBuildServiceJobs(const Attica::Project &p);
++
++    void setStatus(QString status);
++    Attica::Project uiToProject();
++    void projectToUi(const Attica::Project& p);
++    QString currentProject();
++
++    Attica::ProviderManager m_pm;
++    Attica::Provider m_provider;
++    QHash<QString, QSharedPointer<Attica::Provider> > m_providers;
++
++    QString m_currentProjectId;
++    void setProjectPath(const QString& path);
++    CheckableFileSystemModel* m_filesModel;
++    QString m_tarballFileName;
++
++    QWidget* m_mainWidget;
++
++    Ui::EditProject* m_editor;
++
++    QHash<QString, Attica::BuildService> m_buildServices;
++    QHash<QString, Attica::Publisher> m_publishers;
++    QHash<QString, Attica::BuildServiceJob> m_buildServiceJobs;
++    QHash<QString, Attica::Project> m_projects;
++    QHash<QString, QString> m_accounts;
++
++};
++
++#endif // BUILDSERVICEMANAGER_H
+--- /dev/null
++++ b/src/plugins/buildservice/buildserviceplugin.cpp
+@@ -0,0 +1,150 @@
++/**************************************************************************
++**
++** This file is part of Qt Creator
++**
++** Copyright 2009 Frederik Gladhorn <gladhorn at kde.org>
++** Copyright 2010 open-slx: <sebas at open-slx.com>
++**
++** GNU Lesser General Public License Usage
++**
++** This file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file.  Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** If you are unsure which license is appropriate for your use, please
++** contact the sales department at http://www.qtsoftware.com/contact.
++**
++**************************************************************************/
++
++#include "buildserviceplugin.h"
++
++#include <coreplugin/actionmanager/actionmanager.h>
++#include <coreplugin/actionmanager/actioncontainer.h>
++#include <coreplugin/basemode.h>
++#include <coreplugin/coreconstants.h>
++#include <coreplugin/icore.h>
++#include <coreplugin/modemanager.h>
++#include <coreplugin/uniqueidmanager.h>
++
++#include <extensionsystem/pluginmanager.h>
++#include <projectexplorer/session.h>
++#include <projectexplorer/project.h>
++#include <projectexplorer/projectexplorer.h>
++#include <coreplugin/ifile.h>
++
++#include <QtCore/QDebug>
++#include <QtCore/QtPlugin>
++#include <QtGui/QAction>
++#include <QtGui/QMenu>
++#include <QtGui/QMessageBox>
++#include <QtGui/QPushButton>
++#include <QtGui/QVBoxLayout>
++
++#include "buildservicemanager.h"
++
++using namespace BuildService::Internal;
++
++/*! Constructs the Hello World plugin. Normally plugins don't do anything in
++    their constructor except for initializing their member variables. The
++    actual work is done later, in the initialize() and extensionsInitialized()
++    methods.
++*/
++BuildServicePlugin::BuildServicePlugin()
++{
++}
++
++/*! Plugins are responsible for deleting objects they created on the heap, and
++    to unregister objects from the plugin manager that they registered there.
++*/
++BuildServicePlugin::~BuildServicePlugin()
++{
++}
++
++/*! Initializes the plugin. Returns true on success.
++    Plugins want to register objects with the plugin manager here.
++
++    \a error_message can be used to pass an error message to the plugin system,
++       if there was any.
++*/
++bool BuildServicePlugin::initialize(const QStringList &arguments, QString *error_message)
++{
++    Q_UNUSED(arguments)
++    Q_UNUSED(error_message)
++
++    // Get the primary access point to the workbench.
++    Core::ICore *core = Core::ICore::instance();
++
++    // Create a unique context id for our own view, that will be used for the
++    // menu entry later.
++    Core::Context context("BuildService.MainView");
++
++    // Create an action to be triggered by a menu entry
++    QAction *uploadAction = new QAction(tr("&BuildService..."), this);
++    uploadAction->setToolTip(tr("Build and distribute your project online"));
++    connect(uploadAction, SIGNAL(triggered()), SLOT(upload()));
++
++    // Register the action with the action manager
++    Core::ActionManager *actionManager = core->actionManager();
++    Core::Command *command =
++            actionManager->registerAction(
++                    uploadAction, "BuildService.BuildServiceAction", context);
++
++    // Create our own menu to place in the Tools menu
++    Core::ActionContainer *uploadMenu =
++            actionManager->createMenu("BuildService.BuildServiceMenu");
++    QMenu *menu = uploadMenu->menu();
++    menu->setTitle(tr("&BuildService"));
++    menu->setEnabled(true);
++
++    // Add the upload action command to the menu
++    uploadMenu->addAction(command);
++
++    // Request the Tools menu and add the upload menu to it
++    Core::ActionContainer *toolsMenu =
++            actionManager->actionContainer(Core::Constants::M_TOOLS);
++    toolsMenu->addMenu(uploadMenu);
++
++    return true;
++}
++
++/*! Notification that all extensions that this plugin depends on have been
++    initialized. The dependencies are defined in the plugins .qwp file.
++
++    Normally this method is used for things that rely on other plugins to have
++    added objects to the plugin manager, that implement interfaces that we're
++    interested in. These objects can now be requested through the
++    PluginManagerInterface.
++
++    The BuildServicePlugin doesn't need things from other plugins, so it does
++    nothing here.
++*/
++void BuildServicePlugin::extensionsInitialized()
++{
++    // todo: depend on vcs?
++}
++
++void BuildServicePlugin::upload()
++{
++    qDebug() << "BuildServicePlugin::upload()";
++
++    //QDialog dialog;
++    BuildServiceManager foo;
++    foo.exec();
++    //app.exec();
++    //QMessageBox::information(
++    //        0, tr("Hello World!"), tr("Hello World! Beautiful day today, isn't it?"));
++    //ProjectTest foo;
++    //foo.show();
++    //foo.exec();
++    //UploadWizard upload;
++    //upload.exec();
++}
++
++#include "moc_buildserviceplugin.cpp"
++
++//#include "projecttest.moc"
++
++Q_EXPORT_PLUGIN(BuildServicePlugin)
+--- /dev/null
++++ b/src/plugins/buildservice/buildserviceplugin.h
+@@ -0,0 +1,51 @@
++/**************************************************************************
++**
++** This file is part of Qt Creator
++**
++** Copyright 2009 Frederik Gladhorn <gladhorn at kde.org>
++** Copyright 2010 open-slx: <sebas at open-slx.com>
++**
++** GNU Lesser General Public License Usage
++**
++** This file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file.  Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** If you are unsure which license is appropriate for your use, please
++** contact the sales department at http://www.qtsoftware.com/contact.
++**
++**************************************************************************/
++
++#ifndef BUILDSERVICEPLUGIN_H
++#define BUILDSERVICEPLUGIN_H
++
++#include <extensionsystem/iplugin.h>
++
++namespace BuildService {
++namespace Internal {
++
++class BuildServicePlugin
++  : public ExtensionSystem::IPlugin
++{
++    Q_OBJECT
++
++public:
++    BuildServicePlugin();
++    ~BuildServicePlugin();
++
++    bool initialize(const QStringList &arguments, QString *error_message);
++
++    void extensionsInitialized();
++
++private Q_SLOTS:
++    void upload();
++
++};
++
++} // namespace Internal
++} // namespace BuildService
++
++#endif
+--- /dev/null
++++ b/src/plugins/buildservice/checkablefilesystemmodel.cpp
+@@ -0,0 +1,83 @@
++/**************************************************************************
++**
++** This file is part of Qt Creator
++**
++** Copyright 2009 Frederik Gladhorn <gladhorn at kde.org>
++** Copyright 2010 open-slx <sebas at open-slx.com>
++**
++** GNU Lesser General Public License Usage
++**
++** This file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file.  Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** If you are unsure which license is appropriate for your use, please
++** contact the sales department at http://www.qtsoftware.com/contact.
++**
++**************************************************************************/
++
++
++#include "checkablefilesystemmodel.h"
++
++CheckableFileSystemModel::CheckableFileSystemModel(QObject *parent) :
++    QFileSystemModel(parent)
++{
++}
++
++Qt::ItemFlags CheckableFileSystemModel::flags(const QModelIndex &index) const
++{
++    Qt::ItemFlags flag = QFileSystemModel::flags(index);
++
++    if (index.column() == 0) {
++        flag |= Qt::ItemIsUserCheckable;
++    }
++    return flag;
++}
++
++QVariant CheckableFileSystemModel::data(const QModelIndex &index, int role) const
++{
++    if (index.column() == 0 && role == Qt::CheckStateRole) {
++        if (index.parent().data(Qt::CheckStateRole) == Qt::Checked) {
++            return Qt::Checked;
++        } else if (m_checkedPaths.contains(index.data().toString())) {
++            return Qt::Checked;
++        } else {
++            return Qt::Unchecked;
++        }
++    }
++    return QFileSystemModel::data(index, role);
++}
++
++bool CheckableFileSystemModel::setData(const QModelIndex &index, const QVariant &value, int role)
++{
++    if (index.column() == 0 && role == Qt::CheckStateRole) {
++        QString filename = index.data().toString();
++        //QString filepath = filePath(index) + filename;
++        if (m_checkedPaths.contains(filename)) {
++            m_checkedPaths.removeAll(filename);
++            m_checkedFullPaths.removeAll(filename);
++        } else {
++            QDir dir(filePath(index));
++            if (dir.exists()) {
++                m_projectPath = filePath(index);
++                emit projectPathChanged(m_projectPath.absolutePath());
++            }
++            m_checkedPaths.append(filename);
++            m_checkedFullPaths.append(filePath(index));
++        }
++        //qDebug() << "checked: " << filename;
++        return true;
++
++    } else {
++        return QFileSystemModel::setData(index, value, role);
++    }
++
++}
++
++QStringList CheckableFileSystemModel::selectedFiles() const
++{
++    return m_checkedFullPaths;
++}
+--- /dev/null
++++ b/src/plugins/buildservice/checkablefilesystemmodel.h
+@@ -0,0 +1,51 @@
++/**************************************************************************
++**
++** This file is part of Qt Creator
++**
++** Copyright 2009 Frederik Gladhorn <gladhorn at kde.org>
++** Copyright 2010 open-slx <sebas at open-slx.com>
++**
++** GNU Lesser General Public License Usage
++**
++** This file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file.  Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** If you are unsure which license is appropriate for your use, please
++** contact the sales department at http://www.qtsoftware.com/contact.
++**
++**************************************************************************/
++
++
++#ifndef CHECKABLEFILESYSTEMMODEL_H
++#define CHECKABLEFILESYSTEMMODEL_H
++
++#include <QtCore/QDebug>
++#include <QtGui/QFileSystemModel>
++
++
++class CheckableFileSystemModel : public QFileSystemModel
++{
++    Q_OBJECT
++public:
++    explicit CheckableFileSystemModel(QObject *parent = 0);
++
++    Qt::ItemFlags flags(const QModelIndex &index) const;
++    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
++    bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
++
++    QStringList selectedFiles() const;
++
++Q_SIGNALS:
++    void projectPathChanged(const QString &path);
++
++private:
++    QStringList m_checkedPaths;
++    QStringList m_checkedFullPaths;
++    QDir m_projectPath;
++};
++
++#endif // CHECKABLEFILESYSTEMMODEL_H
+--- /dev/null
++++ b/src/plugins/buildservice/editproject.ui
+@@ -0,0 +1,803 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<ui version="4.0">
++ <class>EditProject</class>
++ <widget class="QWidget" name="EditProject">
++  <property name="geometry">
++   <rect>
++    <x>0</x>
++    <y>0</y>
++    <width>543</width>
++    <height>527</height>
++   </rect>
++  </property>
++  <property name="baseSize">
++   <size>
++    <width>632</width>
++    <height>442</height>
++   </size>
++  </property>
++  <property name="windowTitle">
++   <string>Form</string>
++  </property>
++  <layout class="QGridLayout" name="gridLayout_5">
++   <item row="0" column="0">
++    <widget class="QTabWidget" name="tabWidget">
++     <property name="currentIndex">
++      <number>0</number>
++     </property>
++     <widget class="QWidget" name="tab_9">
++      <attribute name="title">
++       <string>Welcome</string>
++      </attribute>
++      <layout class="QVBoxLayout" name="verticalLayout_2">
++       <item>
++        <widget class="QLabel" name="label_46">
++         <property name="text">
++          <string><b>Build and Publish your Project</b></string>
++         </property>
++        </widget>
++       </item>
++       <item>
++        <widget class="QWebView" name="welcome">
++         <property name="contextMenuPolicy">
++          <enum>Qt::NoContextMenu</enum>
++         </property>
++         <property name="acceptDrops">
++          <bool>false</bool>
++         </property>
++         <property name="styleSheet">
++          <string notr="true">body { bgcolor: #000; }</string>
++         </property>
++         <property name="url">
++          <url>
++           <string>about:blank</string>
++          </url>
++         </property>
++         <property name="zoomFactor">
++          <double>0.800000011920929</double>
++         </property>
++        </widget>
++       </item>
++      </layout>
++     </widget>
++     <widget class="QWidget" name="tab_3">
++      <attribute name="title">
++       <string>Accounts</string>
++      </attribute>
++      <layout class="QGridLayout" name="gridLayout_7">
++       <item row="1" column="0" colspan="3">
++        <layout class="QGridLayout" name="gridLayout_4">
++         <item row="0" column="0" rowspan="2">
++          <widget class="QListWidget" name="accounts"/>
++         </item>
++         <item row="0" column="1">
++          <widget class="QPushButton" name="deleteAccount">
++           <property name="text">
++            <string>Delete</string>
++           </property>
++          </widget>
++         </item>
++         <item row="1" column="1">
++          <spacer name="verticalSpacer_2">
++           <property name="orientation">
++            <enum>Qt::Vertical</enum>
++           </property>
++           <property name="sizeHint" stdset="0">
++            <size>
++             <width>20</width>
++             <height>40</height>
++            </size>
++           </property>
++          </spacer>
++         </item>
++        </layout>
++       </item>
++       <item row="4" column="1">
++        <widget class="QComboBox" name="accountsServers"/>
++       </item>
++       <item row="5" column="1">
++        <widget class="QLineEdit" name="username"/>
++       </item>
++       <item row="6" column="1">
++        <widget class="QLineEdit" name="password">
++         <property name="frame">
++          <bool>true</bool>
++         </property>
++         <property name="echoMode">
++          <enum>QLineEdit::PasswordEchoOnEdit</enum>
++         </property>
++        </widget>
++       </item>
++       <item row="5" column="0">
++        <widget class="QLabel" name="label_16">
++         <property name="text">
++          <string>Username:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="6" column="0">
++        <widget class="QLabel" name="label_17">
++         <property name="text">
++          <string>Password:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="5" column="2">
++        <widget class="QPushButton" name="saveAccount">
++         <property name="text">
++          <string>Save</string>
++         </property>
++        </widget>
++       </item>
++       <item row="6" column="2">
++        <widget class="QPushButton" name="createAccount">
++         <property name="text">
++          <string>Create</string>
++         </property>
++        </widget>
++       </item>
++       <item row="4" column="0">
++        <widget class="QLabel" name="label_18">
++         <property name="text">
++          <string>Remote Service:</string>
++         </property>
++        </widget>
++       </item>
++       <item row="0" column="0" colspan="2">
++        <widget class="QLabel" name="label_20">
++         <property name="text">
++          <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
++<html><head><meta name="qrichtext" content="1" /><style type="text/css">
++p, li { white-space: pre-wrap; }
++</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Manage your Remote Service Accounts</span></p></body></html></string>
++         </property>
++        </widget>
++       </item>
++      </layout>
++     </widget>
++     <widget class="QWidget" name="tab">
++      <attribute name="title">
++       <string>Project</string>
++      </attribute>
++      <layout class="QGridLayout" name="gridLayout_3">
++       <item row="0" column="0">
++        <widget class="QLabel" name="label_8">
++         <property name="text">
++          <string><b>Edit Project</b></string>
++         </property>
++        </widget>
++       </item>
++       <item row="1" column="0">
++        <widget class="QLabel" name="label_25">
++         <property name="text">
++          <string>Project:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="1" column="1" colspan="2">
++        <widget class="QComboBox" name="projectsCombo">
++         <property name="minimumSize">
++          <size>
++           <width>200</width>
++           <height>0</height>
++          </size>
++         </property>
++        </widget>
++       </item>
++       <item row="1" column="3">
++        <widget class="QPushButton" name="create">
++         <property name="text">
++          <string>Create New Project</string>
++         </property>
++        </widget>
++       </item>
++       <item row="3" column="0">
++        <widget class="QLabel" name="label_10">
++         <property name="text">
++          <string>ID:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="3" column="1" colspan="3">
++        <widget class="QLineEdit" name="id"/>
++       </item>
++       <item row="4" column="0">
++        <widget class="QLabel" name="label">
++         <property name="text">
++          <string>Name:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="4" column="1" colspan="3">
++        <widget class="QLineEdit" name="name"/>
++       </item>
++       <item row="5" column="0">
++        <widget class="QLabel" name="label_2">
++         <property name="text">
++          <string>Description:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="5" column="1" colspan="3">
++        <widget class="QLineEdit" name="description"/>
++       </item>
++       <item row="6" column="0">
++        <widget class="QLabel" name="label_11">
++         <property name="text">
++          <string>URL:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="6" column="1" colspan="3">
++        <widget class="QLineEdit" name="url"/>
++       </item>
++       <item row="7" column="0">
++        <widget class="QLabel" name="label_3">
++         <property name="text">
++          <string>Summary:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="7" column="1" colspan="3">
++        <widget class="QLineEdit" name="summary"/>
++       </item>
++       <item row="8" column="0">
++        <widget class="QLabel" name="label_4">
++         <property name="text">
++          <string>Developers:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="8" column="1" colspan="3">
++        <widget class="QLineEdit" name="developers"/>
++       </item>
++       <item row="9" column="0">
++        <widget class="QLabel" name="label_5">
++         <property name="text">
++          <string>License:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="9" column="1" colspan="3">
++        <widget class="QLineEdit" name="license"/>
++       </item>
++       <item row="10" column="0">
++        <widget class="QLabel" name="label_6">
++         <property name="text">
++          <string>Version:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="10" column="1" colspan="3">
++        <widget class="QLineEdit" name="version"/>
++       </item>
++       <item row="11" column="0">
++        <widget class="QLabel" name="label_7">
++         <property name="text">
++          <string>Requirements:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="11" column="1" colspan="3">
++        <widget class="QLineEdit" name="requirements"/>
++       </item>
++       <item row="12" column="0">
++        <widget class="QLabel" name="label_12">
++         <property name="toolTip">
++          <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
++<html><head><meta name="qrichtext" content="1" /><style type="text/css">
++p, li { white-space: pre-wrap; }
++</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To automatically generate a spec file for your project, please perform the following steps:</p>
++<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Enter as much information as you have available and click <span style=" font-style:italic;">Save Project</span></p>
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Upload your source code</p>
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Clear the RPM Specfile field of any text and click <span style=" font-style:italic;">Save Project</span></p>
++<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The spec file will now be generated. You may wish to edit the contents of the spec file for various reasons.</p></body></html></string>
++         </property>
++         <property name="text">
++          <string>RPM Specfile:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
++         </property>
++        </widget>
++       </item>
++       <item row="12" column="1" colspan="3">
++        <widget class="QTextEdit" name="specFile">
++         <property name="toolTip">
++          <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
++<html><head><meta name="qrichtext" content="1" /><style type="text/css">
++p, li { white-space: pre-wrap; }
++</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To automatically generate a spec file for your project, please perform the following steps:</p>
++<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Enter as much information as you have available and click <span style=" font-style:italic;">Save Project</span></p>
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Upload your source code</p>
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Clear the RPM Specfile field of any text and click <span style=" font-style:italic;">Save Project</span></p>
++<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The spec file will now be generated. You may wish to edit the contents of the spec file for various reasons.</p></body></html></string>
++         </property>
++        </widget>
++       </item>
++       <item row="13" column="1">
++        <spacer name="horizontalSpacer_3">
++         <property name="orientation">
++          <enum>Qt::Horizontal</enum>
++         </property>
++         <property name="sizeHint" stdset="0">
++          <size>
++           <width>310</width>
++           <height>22</height>
++          </size>
++         </property>
++        </spacer>
++       </item>
++       <item row="13" column="2" colspan="2">
++        <layout class="QHBoxLayout" name="horizontalLayout">
++         <item>
++          <widget class="QPushButton" name="deleteProject">
++           <property name="text">
++            <string>Delete Project</string>
++           </property>
++          </widget>
++         </item>
++         <item>
++          <widget class="QPushButton" name="save">
++           <property name="text">
++            <string>Save Project</string>
++           </property>
++          </widget>
++         </item>
++        </layout>
++       </item>
++       <item row="14" column="1" colspan="3">
++        <spacer name="verticalSpacer">
++         <property name="orientation">
++          <enum>Qt::Vertical</enum>
++         </property>
++         <property name="sizeHint" stdset="0">
++          <size>
++           <width>265</width>
++           <height>9</height>
++          </size>
++         </property>
++        </spacer>
++       </item>
++       <item row="2" column="0" colspan="4">
++        <widget class="Line" name="line_2">
++         <property name="orientation">
++          <enum>Qt::Horizontal</enum>
++         </property>
++        </widget>
++       </item>
++      </layout>
++     </widget>
++     <widget class="QWidget" name="tab_10">
++      <attribute name="title">
++       <string>Upload</string>
++      </attribute>
++      <layout class="QGridLayout" name="gridLayout">
++       <item row="0" column="0" colspan="2">
++        <widget class="QLabel" name="label_45">
++         <property name="text">
++          <string><b>Upload your project to a build service</b></string>
++         </property>
++        </widget>
++       </item>
++       <item row="1" column="0">
++        <widget class="QLabel" name="label_21">
++         <property name="text">
++          <string>Select Path::</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
++         </property>
++        </widget>
++       </item>
++       <item row="1" column="1">
++        <widget class="QTreeView" name="treeView">
++         <property name="minimumSize">
++          <size>
++           <width>0</width>
++           <height>300</height>
++          </size>
++         </property>
++         <attribute name="headerDefaultSectionSize">
++          <number>200</number>
++         </attribute>
++        </widget>
++       </item>
++       <item row="2" column="1">
++        <widget class="QLineEdit" name="projectPath"/>
++       </item>
++       <item row="3" column="1">
++        <layout class="QHBoxLayout" name="horizontalLayout_3">
++         <item>
++          <spacer name="horizontalSpacer_2">
++           <property name="orientation">
++            <enum>Qt::Horizontal</enum>
++           </property>
++           <property name="sizeHint" stdset="0">
++            <size>
++             <width>40</width>
++             <height>20</height>
++            </size>
++           </property>
++          </spacer>
++         </item>
++         <item>
++          <widget class="QPushButton" name="upload">
++           <property name="text">
++            <string>Upload</string>
++           </property>
++          </widget>
++         </item>
++        </layout>
++       </item>
++      </layout>
++     </widget>
++     <widget class="QWidget" name="tab_2">
++      <attribute name="title">
++       <string>Build</string>
++      </attribute>
++      <layout class="QGridLayout" name="gridLayout_2">
++       <item row="0" column="0">
++        <widget class="QLabel" name="label_9">
++         <property name="text">
++          <string><b>Build Jobs</b></string>
++         </property>
++        </widget>
++       </item>
++       <item row="1" column="0">
++        <widget class="QLabel" name="label_26">
++         <property name="text">
++          <string>Build Service:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="1" column="1">
++        <widget class="QComboBox" name="buildServices"/>
++       </item>
++       <item row="2" column="0">
++        <widget class="QLabel" name="label_14">
++         <property name="text">
++          <string>Target:</string>
++         </property>
++         <property name="alignment">
++          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++         </property>
++        </widget>
++       </item>
++       <item row="2" column="1">
++        <widget class="QComboBox" name="targets"/>
++       </item>
++       <item row="3" column="1">
++        <layout class="QHBoxLayout" name="horizontalLayout_4">
++         <item>
++          <spacer name="horizontalSpacer_4">
++           <property name="orientation">
++            <enum>Qt::Horizontal</enum>
++           </property>
++           <property name="sizeHint" stdset="0">
++            <size>
++             <width>40</width>
++             <height>20</height>
++            </size>
++           </property>
++          </spacer>
++         </item>
++         <item>
++          <widget class="QPushButton" name="build">
++           <property name="text">
++            <string>Launh Build</string>
++           </property>
++          </widget>
++         </item>
++        </layout>
++       </item>
++       <item row="4" column="0" colspan="2">
++        <widget class="Line" name="line">
++         <property name="orientation">
++          <enum>Qt::Horizontal</enum>
++         </property>
++        </widget>
++       </item>
++       <item row="5" column="0">
++        <widget class="QLabel" name="label_13">
++         <property name="font">
++          <font>
++           <weight>75</weight>
++           <bold>true</bold>
++          </font>
++         </property>
++         <property name="text">
++          <string>Existing Jobs</string>
++         </property>
++        </widget>
++       </item>
++       <item row="6" column="0" colspan="2">
++        <layout class="QHBoxLayout" name="horizontalLayout_5">
++         <item>
++          <widget class="QListWidget" name="buildServiceJobs"/>
++         </item>
++         <item>
++          <layout class="QVBoxLayout" name="verticalLayout_3">
++           <item>
++            <widget class="QPushButton" name="cancelJob">
++             <property name="text">
++              <string>Cancel</string>
++             </property>
++            </widget>
++           </item>
++           <item>
++            <spacer name="verticalSpacer_3">
++             <property name="orientation">
++              <enum>Qt::Vertical</enum>
++             </property>
++             <property name="sizeHint" stdset="0">
++              <size>
++               <width>20</width>
++               <height>40</height>
++              </size>
++             </property>
++            </spacer>
++           </item>
++           <item>
++            <widget class="QPushButton" name="updateJob">
++             <property name="text">
++              <string>Update</string>
++             </property>
++            </widget>
++           </item>
++          </layout>
++         </item>
++        </layout>
++       </item>
++       <item row="7" column="0" colspan="2">
++        <widget class="QFrame" name="buildjobinfo">
++         <property name="frameShape">
++          <enum>QFrame::StyledPanel</enum>
++         </property>
++         <property name="frameShadow">
++          <enum>QFrame::Raised</enum>
++         </property>
++         <layout class="QGridLayout" name="gridLayout_6">
++          <item row="0" column="0">
++           <widget class="QLabel" name="label_15">
++            <property name="font">
++             <font>
++              <weight>75</weight>
++              <bold>true</bold>
++             </font>
++            </property>
++            <property name="text">
++             <string>Job Details</string>
++            </property>
++           </widget>
++          </item>
++          <item row="0" column="1" colspan="2">
++           <widget class="QLabel" name="joburl">
++            <property name="text">
++             <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
++<html><head><meta name="qrichtext" content="1" /><style type="text/css">
++p, li { white-space: pre-wrap; }
++</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://somewhere.com">Buildservice Job</a></p></body></html></string>
++            </property>
++            <property name="textFormat">
++             <enum>Qt::RichText</enum>
++            </property>
++            <property name="alignment">
++             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++            </property>
++            <property name="openExternalLinks">
++             <bool>true</bool>
++            </property>
++           </widget>
++          </item>
++          <item row="1" column="0">
++           <widget class="QLabel" name="label_19">
++            <property name="text">
++             <string>Build Service:</string>
++            </property>
++           </widget>
++          </item>
++          <item row="1" column="1" colspan="2">
++           <widget class="QLabel" name="jobbsname">
++            <property name="text">
++             <string>build service name</string>
++            </property>
++           </widget>
++          </item>
++          <item row="2" column="0" rowspan="2">
++           <widget class="QLabel" name="label_27">
++            <property name="text">
++             <string>Message:</string>
++            </property>
++            <property name="alignment">
++             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
++            </property>
++           </widget>
++          </item>
++          <item row="2" column="1" colspan="2">
++           <widget class="QLabel" name="jobmessage">
++            <property name="text">
++             <string>buildservice details</string>
++            </property>
++            <property name="wordWrap">
++             <bool>true</bool>
++            </property>
++           </widget>
++          </item>
++          <item row="3" column="2">
++           <widget class="QPushButton" name="shofullbuildoutput">
++            <property name="text">
++             <string>Show Full Build Output...</string>
++            </property>
++           </widget>
++          </item>
++          <item row="3" column="1">
++           <spacer name="horizontalSpacer_5">
++            <property name="orientation">
++             <enum>Qt::Horizontal</enum>
++            </property>
++            <property name="sizeHint" stdset="0">
++             <size>
++              <width>40</width>
++              <height>20</height>
++             </size>
++            </property>
++           </spacer>
++          </item>
++         </layout>
++        </widget>
++       </item>
++      </layout>
++     </widget>
++     <widget class="QWidget" name="tab_4">
++      <attribute name="title">
++       <string>Publish</string>
++      </attribute>
++      <layout class="QFormLayout" name="formLayout_2">
++       <item row="0" column="0">
++        <widget class="QLabel" name="label_22">
++         <property name="text">
++          <string><b>Publish your project</b></string>
++         </property>
++        </widget>
++       </item>
++       <item row="1" column="0">
++        <widget class="QLabel" name="label_23">
++         <property name="text">
++          <string>Select Build:</string>
++         </property>
++        </widget>
++       </item>
++       <item row="1" column="1">
++        <widget class="QListWidget" name="completedBuilds"/>
++       </item>
++       <item row="2" column="0">
++        <widget class="QLabel" name="label_24">
++         <property name="text">
++          <string>Select Publisher:</string>
++         </property>
++        </widget>
++       </item>
++       <item row="2" column="1">
++        <widget class="QListWidget" name="publishers"/>
++       </item>
++       <item row="3" column="1">
++        <layout class="QHBoxLayout" name="horizontalLayout_2">
++         <item>
++          <widget class="QPushButton" name="refreshPublishers">
++           <property name="text">
++            <string>Refresh</string>
++           </property>
++          </widget>
++         </item>
++         <item>
++          <spacer name="horizontalSpacer">
++           <property name="orientation">
++            <enum>Qt::Horizontal</enum>
++           </property>
++           <property name="sizeHint" stdset="0">
++            <size>
++             <width>40</width>
++             <height>20</height>
++            </size>
++           </property>
++          </spacer>
++         </item>
++         <item>
++          <widget class="QPushButton" name="publish">
++           <property name="text">
++            <string>Publish</string>
++           </property>
++          </widget>
++         </item>
++        </layout>
++       </item>
++       <item row="4" column="1">
++        <spacer name="verticalSpacer_7">
++         <property name="orientation">
++          <enum>Qt::Vertical</enum>
++         </property>
++         <property name="sizeHint" stdset="0">
++          <size>
++           <width>20</width>
++           <height>40</height>
++          </size>
++         </property>
++        </spacer>
++       </item>
++      </layout>
++     </widget>
++    </widget>
++   </item>
++   <item row="1" column="0">
++    <widget class="QLabel" name="status">
++     <property name="text">
++      <string>The Quick Brown Fox Jumped over the Lazy Dog.</string>
++     </property>
++     <property name="alignment">
++      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++     </property>
++     <property name="wordWrap">
++      <bool>true</bool>
++     </property>
++    </widget>
++   </item>
++  </layout>
++ </widget>
++ <customwidgets>
++  <customwidget>
++   <class>QWebView</class>
++   <extends>QWidget</extends>
++   <header>QtWebKit/QWebView</header>
++  </customwidget>
++ </customwidgets>
++ <resources/>
++ <connections/>
++</ui>
+--- /dev/null
++++ b/src/plugins/buildservice/getcredentials.cpp
+@@ -0,0 +1,33 @@
++#include "getcredentials.h"
++#include "ui_getcredentials.h"
++
++getcredentials::getcredentials(QWidget *parent) :
++    QDialog(parent),
++    ui(new Ui::getcredentials)
++{
++    ui->setupUi(this);
++
++    connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(acceptDialog()));
++    connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(cancelDialog()));
++}
++
++getcredentials::~getcredentials()
++{
++    delete ui;
++}
++
++QStringList getcredentials::credentials() const
++{
++    return QStringList(credentialsList);
++}
++
++void getcredentials::acceptDialog()
++{
++    credentialsList << ui->username->text() << ui->password->text();
++    accept();
++}
++
++void getcredentials::cancelDialog()
++{
++    reject();
++}
+--- /dev/null
++++ b/src/plugins/buildservice/getcredentials.h
+@@ -0,0 +1,29 @@
++#ifndef GETCREDENTIALS_H
++#define GETCREDENTIALS_H
++
++#include <QDialog>
++
++namespace Ui {
++    class getcredentials;
++}
++
++class getcredentials : public QDialog
++{
++    Q_OBJECT
++
++public:
++    explicit getcredentials(QWidget *parent = 0);
++    ~getcredentials();
++
++    QStringList credentials() const;
++
++private:
++    Ui::getcredentials *ui;
++    QStringList credentialsList;
++
++private Q_SLOTS:
++    void acceptDialog();
++    void cancelDialog();
++};
++
++#endif // GETCREDENTIALS_H
+--- /dev/null
++++ b/src/plugins/buildservice/getcredentials.ui
+@@ -0,0 +1,118 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<ui version="4.0">
++ <class>getcredentials</class>
++ <widget class="QDialog" name="getcredentials">
++  <property name="geometry">
++   <rect>
++    <x>0</x>
++    <y>0</y>
++    <width>400</width>
++    <height>136</height>
++   </rect>
++  </property>
++  <property name="windowTitle">
++   <string>Dialog</string>
++  </property>
++  <layout class="QGridLayout" name="gridLayout">
++   <item row="0" column="0" colspan="2">
++    <widget class="QLabel" name="label">
++     <property name="text">
++      <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
++<html><head><meta name="qrichtext" content="1" /><style type="text/css">
++p, li { white-space: pre-wrap; }
++</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
++<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Please enter your username and password for the <a href="http://opendesktop.org/"><span style=" text-decoration: underline; color:#0057ae;">openDesktop.org</span></a> service. If you do not have an account, please visit the site and register.</p></body></html></string>
++     </property>
++     <property name="alignment">
++      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
++     </property>
++     <property name="wordWrap">
++      <bool>true</bool>
++     </property>
++    </widget>
++   </item>
++   <item row="1" column="0">
++    <widget class="QLabel" name="label_2">
++     <property name="text">
++      <string>Username:</string>
++     </property>
++    </widget>
++   </item>
++   <item row="1" column="1">
++    <widget class="QLineEdit" name="username"/>
++   </item>
++   <item row="2" column="0">
++    <widget class="QLabel" name="label_3">
++     <property name="text">
++      <string>Password:</string>
++     </property>
++    </widget>
++   </item>
++   <item row="2" column="1">
++    <widget class="QLineEdit" name="password">
++     <property name="echoMode">
++      <enum>QLineEdit::PasswordEchoOnEdit</enum>
++     </property>
++    </widget>
++   </item>
++   <item row="3" column="0" colspan="2">
++    <spacer name="verticalSpacer">
++     <property name="orientation">
++      <enum>Qt::Vertical</enum>
++     </property>
++     <property name="sizeHint" stdset="0">
++      <size>
++       <width>20</width>
++       <height>14</height>
++      </size>
++     </property>
++    </spacer>
++   </item>
++   <item row="4" column="0" colspan="2">
++    <widget class="QDialogButtonBox" name="buttonBox">
++     <property name="orientation">
++      <enum>Qt::Horizontal</enum>
++     </property>
++     <property name="standardButtons">
++      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
++     </property>
++    </widget>
++   </item>
++  </layout>
++ </widget>
++ <resources/>
++ <connections>
++  <connection>
++   <sender>buttonBox</sender>
++   <signal>accepted()</signal>
++   <receiver>getcredentials</receiver>
++   <slot>accept()</slot>
++   <hints>
++    <hint type="sourcelabel">
++     <x>248</x>
++     <y>254</y>
++    </hint>
++    <hint type="destinationlabel">
++     <x>157</x>
++     <y>274</y>
++    </hint>
++   </hints>
++  </connection>
++  <connection>
++   <sender>buttonBox</sender>
++   <signal>rejected()</signal>
++   <receiver>getcredentials</receiver>
++   <slot>reject()</slot>
++   <hints>
++    <hint type="sourcelabel">
++     <x>316</x>
++     <y>260</y>
++    </hint>
++    <hint type="destinationlabel">
++     <x>286</x>
++     <y>274</y>
++    </hint>
++   </hints>
++  </connection>
++ </connections>
++</ui>
+--- /dev/null
++++ b/src/plugins/buildservice/main.cpp
+@@ -0,0 +1,10 @@
++#include <QtGui/QApplication>
++#include "buildservicemanager.h"
++
++int main(int argc, char** argv)
++{
++    QApplication app(argc, argv);
++    BuildServiceManager foo;
++    foo.show();
++    return app.exec();
++}
+--- a/src/plugins/plugins.pro
++++ b/src/plugins/plugins.pro
+@@ -34,6 +34,7 @@ SUBDIRS   = plugin_coreplugin \
+             plugin_genericprojectmanager \
+             plugin_qmljseditor \
+             plugin_mercurial \
++            plugin_buildservice \
+             plugin_classview \
+             plugin_tasklist \
+             debugger/dumper.pro
+@@ -223,6 +224,10 @@ plugin_mercurial.depends = plugin_vcsbas
+ plugin_mercurial.depends += plugin_projectexplorer
+ plugin_mercurial.depends += plugin_coreplugin
+ 
++plugin_buildservice.subdir = buildservice
++plugin_buildservice.depends = plugin_coreplugin
++plugin_buildservice.depends += plugin_locator
++
+ plugin_classview.subdir = classview
+ plugin_classview.depends = plugin_coreplugin
+ plugin_classview.depends += plugin_cpptools
--- patches/ftbfs_allow-shlib-undefined_no-undefined.patch
+++ patches/ftbfs_allow-shlib-undefined_no-undefined.patch
+Description: it causes a ftbfs on 64bits distributions (linux-g++-*)
+Author: Fathi Boudra <fathi.boudra at nokia.com>
+--- a/qtcreator.pri
++++ b/qtcreator.pri
+@@ -140,12 +140,6 @@ unix {
+     UI_DIR = $${OUT_PWD}/.uic
+ }
+ 
+-linux-g++-* {
+-    # Bail out on non-selfcontained libraries. Just a security measure
+-    # to prevent checking in code that does not compile on other platforms.
+-    QMAKE_LFLAGS += -Wl,--allow-shlib-undefined -Wl,--no-undefined
+-}
+-
+ win32-msvc* { 
+     #Don't warn about sprintf, fopen etc being 'unsafe'
+     DEFINES += _CRT_SECURE_NO_WARNINGS
--- patches/ftbfs_missing_webkit.patch
+++ patches/ftbfs_missing_webkit.patch
+--- a/src/plugins/qmldesigner/designercore/designercore.pri
++++ b/src/plugins/qmldesigner/designercore/designercore.pri
+@@ -2,7 +2,8 @@ include($$PWD/filemanager/filemanager.pr
+ include (../config.pri)
+ 
+ QT += script \
+-    declarative
++    declarative \
++    webkit
+ 
+ DEFINES += TEST_EXPORTS
+ INCLUDEPATH += $$PWD \
--- patches/series
+++ patches/series
@@ -3,3 +3,6 @@
 
 # MeeGo patches
 meego-sdk-qt-creator-2.1.0-rc1.patch
+ftbfs_missing_webkit.patch
+ftbfs_allow-shlib-undefined_no-undefined.patch
+buildservice_plugin_20101217.patch

++++++ ftbfs_allow-shlib-undefined_no-undefined.patch (new)
--- ftbfs_allow-shlib-undefined_no-undefined.patch
+++ ftbfs_allow-shlib-undefined_no-undefined.patch
+Description: it causes a ftbfs on 64bits distributions (linux-g++-*)
+Author: Fathi Boudra <fathi.boudra at nokia.com>
+--- a/qtcreator.pri
++++ b/qtcreator.pri
+@@ -140,12 +140,6 @@ unix {
+     UI_DIR = $${OUT_PWD}/.uic
+ }
+ 
+-linux-g++-* {
+-    # Bail out on non-selfcontained libraries. Just a security measure
+-    # to prevent checking in code that does not compile on other platforms.
+-    QMAKE_LFLAGS += -Wl,--allow-shlib-undefined -Wl,--no-undefined
+-}
+-
+ win32-msvc* { 
+     #Don't warn about sprintf, fopen etc being 'unsafe'
+     DEFINES += _CRT_SECURE_NO_WARNINGS

++++++ ftbfs_missing_webkit.patch (new)
--- ftbfs_missing_webkit.patch
+++ ftbfs_missing_webkit.patch
+--- a/src/plugins/qmldesigner/designercore/designercore.pri
++++ b/src/plugins/qmldesigner/designercore/designercore.pri
+@@ -2,7 +2,8 @@ include($$PWD/filemanager/filemanager.pr
+ include (../config.pri)
+ 
+ QT += script \
+-    declarative
++    declarative \
++    webkit
+ 
+ DEFINES += TEST_EXPORTS
+ INCLUDEPATH += $$PWD \




More information about the MeeGo-commits mailing list