summaryrefslogtreecommitdiffstats
path: root/src/libs/installer
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer')
-rw-r--r--src/libs/installer/adminauthorization_x11.cpp8
-rw-r--r--src/libs/installer/downloadarchivesjob.cpp7
-rw-r--r--src/libs/installer/fsengineserver.cpp7
-rw-r--r--src/libs/installer/graph.h2
-rw-r--r--src/libs/installer/packagemanagergui.cpp9
-rw-r--r--src/libs/installer/repository.cpp6
6 files changed, 18 insertions, 21 deletions
diff --git a/src/libs/installer/adminauthorization_x11.cpp b/src/libs/installer/adminauthorization_x11.cpp
index d2d1ad669..92567050a 100644
--- a/src/libs/installer/adminauthorization_x11.cpp
+++ b/src/libs/installer/adminauthorization_x11.cpp
@@ -177,19 +177,21 @@ bool AdminAuthorization::execute(QWidget *parent, const QString &program, const
QRegExp re(QLatin1String("[Pp]assword.*:"));
QByteArray errData;
flags = ::fcntl(masterFD, F_GETFD);
-// if (flags != -1)
-// ::fcntl(masterFD, F_SETFL, flags | O_NONBLOCK);
int bytes = 0;
int errBytes = 0;
char buf[1024];
+ char errBuf[1024];
while (bytes >= 0) {
int state;
if (::waitpid(child, &state, WNOHANG) == -1)
break;
bytes = ::read(masterFD, buf, 1023);
- errBytes = ::read(pipedData[0], buf, 1023);
+ errBytes = ::read(pipedData[0], errBuf, 1023);
if (errBytes > 0)
+ {
errData.append(buf, errBytes);
+ errBytes=0;
+ }
if (bytes > 0) {
const QString line = QString::fromLatin1(buf, bytes);
if (re.indexIn(line) != -1) {
diff --git a/src/libs/installer/downloadarchivesjob.cpp b/src/libs/installer/downloadarchivesjob.cpp
index 82f9b365c..620eedd60 100644
--- a/src/libs/installer/downloadarchivesjob.cpp
+++ b/src/libs/installer/downloadarchivesjob.cpp
@@ -319,10 +319,9 @@ KDUpdater::FileDownloader *DownloadArchivesJob::setupDownloader(const QString &s
Qt::QueuedConnection);
connect(downloader, SIGNAL(downloadStatus(QString)), this, SIGNAL(downloadStatusChanged(QString)));
- if (scheme == QLatin1String("http") || scheme == QLatin1String("ftp") ||
- scheme == QLatin1String("file")) {
- downloader->setDownloadedFileName(component->localTempPath() + QLatin1String("/")
- + component->name() + QLatin1String("/") + fi.fileName() + suffix);
+ if (FileDownloaderFactory::isSupportedScheme(scheme)) {
+ downloader->setDownloadedFileName(component->localTempPath() + QLatin1Char('/')
+ + component->name() + QLatin1Char('/') + fi.fileName() + suffix);
}
QString message = tr("Downloading archive hash for component: %1");
diff --git a/src/libs/installer/fsengineserver.cpp b/src/libs/installer/fsengineserver.cpp
index 326a2a02a..669ed4248 100644
--- a/src/libs/installer/fsengineserver.cpp
+++ b/src/libs/installer/fsengineserver.cpp
@@ -467,7 +467,14 @@ QByteArray FSEngineConnectionThread::handleCommand(const QString &command)
receivedStream >> byteArray;
returnStream << process->write(byteArray);
}
+#ifdef Q_OS_WIN
+ else if (command == QLatin1String("QProcess::setNativeArguments")) {
+ QString arguments;
+ receivedStream >> arguments;
+ process->setNativeArguments(arguments);
+ }
+#endif
// from here, QFSEngine handling
else if (command == QLatin1String("QFSFileEngine::atEnd")) {
returnStream << engine.atEnd();
diff --git a/src/libs/installer/graph.h b/src/libs/installer/graph.h
index 59778a440..04fdb941c 100644
--- a/src/libs/installer/graph.h
+++ b/src/libs/installer/graph.h
@@ -144,7 +144,7 @@ private:
foreach (const T &adjacency, edges(node))
visit(adjacency, resolvedNodes, visitedNodes);
- // append this node the the ordered list
+ // append this node to the ordered list
resolvedNodes->append(node);
}
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index 9d6414adc..1757f21f5 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -123,9 +123,7 @@ public:
, m_widget(widget)
{
setObjectName(QLatin1String("Dynamic") + widget->objectName());
- setPixmap(QWizard::LogoPixmap, logoPixmap());
setPixmap(QWizard::WatermarkPixmap, QPixmap());
- setPixmap(QWizard::BannerPixmap, QPixmap());
setLayout(new QVBoxLayout);
setColoredSubTitle(QLatin1String(" "));
@@ -903,13 +901,6 @@ LicenseAgreementPage::LicenseAgreementPage(PackageManagerCore *core)
m_rejectLabel->setObjectName(QLatin1String("RejectLicenseLabel"));
m_rejectLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
-#ifdef Q_OS_UNIX
- QFont labelFont(font());
- labelFont.setPixelSize(9);
- m_acceptLabel->setFont(labelFont);
- m_rejectLabel->setFont(labelFont);
-#endif
-
QGridLayout *gridLayout = new QGridLayout;
gridLayout->setColumnStretch(1, 1);
gridLayout->addWidget(m_acceptRadioButton, 0, 0);
diff --git a/src/libs/installer/repository.cpp b/src/libs/installer/repository.cpp
index 786cb2a49..261bdaac9 100644
--- a/src/libs/installer/repository.cpp
+++ b/src/libs/installer/repository.cpp
@@ -40,6 +40,7 @@
**************************************************************************/
#include "repository.h"
+#include "kdupdaterfiledownloaderfactory.h"
#include <QFileInfo>
#include <QStringList>
@@ -89,11 +90,8 @@ Repository::Repository(const QUrl &url, bool isDefault)
*/
Repository Repository::fromUserInput(const QString &repositoryUrl)
{
- QStringList supportedSchemes;
- supportedSchemes << QLatin1String("http") << QLatin1String("https") << QLatin1String("ftp") <<
- QLatin1String("file");
-
QUrl url = QUrl::fromUserInput(repositoryUrl);
+ const QStringList supportedSchemes = KDUpdater::FileDownloaderFactory::supportedSchemes();
if (!supportedSchemes.contains(url.scheme()) && QFileInfo(url.toString()).exists())
url = QLatin1String("file:///") + url.toString();