Commit f8e89a92 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Small improvements to Extras-devel publisher.

parent f3d5fd83
......@@ -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,
......
......@@ -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
......
......@@ -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;
......
......@@ -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();
}
......
......@@ -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
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment