From f8e89a92db028ed4e16e4fc7ded088167de8ef51 Mon Sep 17 00:00:00 2001 From: Christian Kandeler <christian.kandeler@nokia.com> Date: Wed, 24 Nov 2010 18:35:52 +0100 Subject: [PATCH] Maemo: Small improvements to Extras-devel publisher. --- .../qt-maemo/maemopublishedprojectmodel.cpp | 2 +- .../qt-maemo/maemopublishedprojectmodel.h | 2 -- .../qt-maemo/maemopublisherfremantlefree.cpp | 4 +++ ...maemopublishingresultpagefremantlefree.cpp | 25 +++++++++---------- .../maemopublishingwizardfactories.cpp | 4 +-- .../maemopublishingwizardfremantlefree.cpp | 2 +- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublishedprojectmodel.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopublishedprojectmodel.cpp index e2e63015019..66750ae9651 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopublishedprojectmodel.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublishedprojectmodel.cpp @@ -76,7 +76,7 @@ Qt::ItemFlags MaemoPublishedProjectModel::flags(const QModelIndex &index) const { if (index.column() != IncludeColumn) return QFileSystemModel::flags(index); - return Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable; + return Qt::ItemIsEnabled | Qt::ItemIsUserCheckable; } QVariant MaemoPublishedProjectModel::data(const QModelIndex &index, diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublishedprojectmodel.h b/src/plugins/qt4projectmanager/qt-maemo/maemopublishedprojectmodel.h index cb31070fcd7..e0b4cb62507 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopublishedprojectmodel.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublishedprojectmodel.h @@ -41,7 +41,6 @@ #ifndef MAEMOPUBLISHEDPROJECTMODEL_H #define MAEMOPUBLISHEDPROJECTMODEL_H -#include <QtCore/QPersistentModelIndex> #include <QtCore/QSet> #include <QtCore/QStringList> #include <QtGui/QFileSystemModel> @@ -67,7 +66,6 @@ private: virtual Qt::ItemFlags flags(const QModelIndex &index) const; QSet<QString> m_filesToExclude; - QPersistentModelIndex m_rootIndex; }; } // namespace Internal diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp index ae23e326097..64d7bea9256 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp @@ -210,6 +210,7 @@ bool MaemoPublisherFremantleFree::copyRecursively(const QString &srcFilePath, QDir::toNativeSeparators(tgtFilePath))); return false; } + QCoreApplication::processEvents(); if (tgtFilePath == m_tmpProjectDir + QLatin1String("/debian/rules")) { QFile rulesFile(tgtFilePath); @@ -520,6 +521,9 @@ void MaemoPublisherFremantleFree::setState(State newState) case StartingScp: case PreparingToUploadFile: case UploadingFile: + // TODO: Can we ensure the remote scp exits, e.g. by sending + // an illegal sequence of bytes? (Probably not, if + // we are currently uploading a file.) disconnect(m_uploader.data(), 0, this, 0); m_uploader = SshRemoteProcessRunner::Ptr(); break; diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingresultpagefremantlefree.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingresultpagefremantlefree.cpp index 5011633fd43..32de977d43f 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingresultpagefremantlefree.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingresultpagefremantlefree.cpp @@ -33,13 +33,13 @@ namespace Qt4ProjectManager { namespace Internal { -typedef MaemoPublisherFremantleFree MPSFF; +typedef MaemoPublisherFremantleFree MPFF; -MaemoPublishingResultPageFremantleFree::MaemoPublishingResultPageFremantleFree(MPSFF *publisher, +MaemoPublishingResultPageFremantleFree::MaemoPublishingResultPageFremantleFree(MPFF *publisher, QWidget *parent) : QWizardPage(parent), m_publisher(publisher), ui(new Ui::MaemoPublishingResultPageFremantleFree) { - m_lastOutputType = MPSFF::StatusOutput; + m_lastOutputType = MPFF::StatusOutput; ui->setupUi(this); } @@ -61,27 +61,27 @@ void MaemoPublishingResultPageFremantleFree::initializePage() void MaemoPublishingResultPageFremantleFree::handleFinished() { - handleProgress(m_publisher->resultString(), MPSFF::StatusOutput); + handleProgress(m_publisher->resultString(), MPFF::StatusOutput); m_isComplete = true; cancelButton()->setEnabled(false); emit completeChanged(); } void MaemoPublishingResultPageFremantleFree::handleProgress(const QString &text, - MPSFF::OutputType type) + MPFF::OutputType type) { - const QString color = QLatin1String(type == MPSFF::StatusOutput - || type == MPSFF::ToolStatusOutput ? "blue" : "red"); + const QString color = QLatin1String(type == MPFF::StatusOutput + || type == MPFF::ToolStatusOutput ? "blue" : "red"); ui->progressTextEdit->setTextColor(QColor(color)); - const bool bold = type == MPSFF::StatusOutput - || type == MPSFF::ErrorOutput ? true : false; + const bool bold = type == MPFF::StatusOutput + || type == MPFF::ErrorOutput ? true : false; QFont font = ui->progressTextEdit->currentFont(); font.setBold(bold); ui->progressTextEdit->setCurrentFont(font); - if (type == MPSFF::StatusOutput || type == MPSFF::ErrorOutput - || m_lastOutputType == MPSFF::StatusOutput - || m_lastOutputType == MPSFF::ErrorOutput) { + if (type == MPFF::StatusOutput || type == MPFF::ErrorOutput + || m_lastOutputType == MPFF::StatusOutput + || m_lastOutputType == MPFF::ErrorOutput) { ui->progressTextEdit->append(text); } else { ui->progressTextEdit->insertPlainText(text); @@ -92,7 +92,6 @@ void MaemoPublishingResultPageFremantleFree::handleProgress(const QString &text, void MaemoPublishingResultPageFremantleFree::handleCancelRequest() { - qDebug("Calling cancel()"); cancelButton()->setEnabled(false); m_publisher->cancel(); } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingwizardfactories.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingwizardfactories.cpp index a4cb09579a6..422e449fa01 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingwizardfactories.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingwizardfactories.cpp @@ -57,8 +57,8 @@ QString MaemoPublishingWizardFactoryFremantleFree::description() const "it to a build server, where the project will be compiled and " "packaged and then moved to the \"Extras-devel free\" " "repository, from where users can install it onto their N900 " - "devices. For the upload part, an account at garage.maemo.org " - "is required."); + "devices. For the upload functionality, an account at " + "garage.maemo.org is required."); } bool MaemoPublishingWizardFactoryFremantleFree::canCreateWizard(const Project *project) const diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingwizardfremantlefree.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingwizardfremantlefree.cpp index b2b8cafd093..510001ddd21 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingwizardfremantlefree.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingwizardfremantlefree.cpp @@ -61,7 +61,7 @@ MaemoPublishingWizardFremantleFree::MaemoPublishingWizardFremantleFree(const Pro { setOption(NoCancelButton, false); const QString titleText - = tr("Publishing to Fremantle's \"Extras-devel/free\" Repository"); + = tr("Publishing to Fremantle's \"Extras-devel free\" Repository"); m_buildSettingsPage = new MaemoPublishingBuildSettingsPageFremantleFree(project, m_publisher); m_buildSettingsPage->setTitle(titleText); -- GitLab