[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasmate/frameworks] /: Make the removeinstaller able to be build
From:       Antonis Tsiapaliokas <kok3rs () gmail ! com>
Date:       2014-03-17 11:51:13
Message-ID: E1WPW4X-0003pC-6H () scm ! kde ! org
[Download RAW message or body]

Git commit 805084d5aad25d41a413f630ddf328d6adaea0db by Antonis Tsiapaliokas.
Committed on 17/03/2014 at 11:25.
Pushed by tsiapaliokas into branch 'frameworks'.

Make the removeinstaller able to be build

REVIEW: 114566

M  +1    -0    CMakeLists.txt
M  +15   -14   plasmate/CMakeLists.txt
M  +3    -4    plasmate/publisher/remoteinstaller/remoteinstaller.cpp
M  +4    -2    plasmate/publisher/remoteinstaller/remoteinstallerdialog.cpp

http://commits.kde.org/plasmate/805084d5aad25d41a413f630ddf328d6adaea0db

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b33ced..a5d541c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,6 +57,7 @@ find_package(KF5Plasma REQUIRED NO_MODULE)
 find_package(KF5PlasmaQuick REQUIRED NO_MODULE)
 find_package(KF5Declarative REQUIRED NO_MODULE)
 find_package(KF5KIO REQUIRED NO_MODULE)
+find_package(KF5KDE4Support REQUIRED NO_MODULE)
 
 #########################################################################
 
diff --git a/plasmate/CMakeLists.txt b/plasmate/CMakeLists.txt
index c5ba150..59d289f 100644
--- a/plasmate/CMakeLists.txt
+++ b/plasmate/CMakeLists.txt
@@ -123,22 +123,23 @@ install(FILES plasmate.knsrc DESTINATION ${CONFIG_INSTALL_DIR})
 
 ##standalone applications
 #plasmaremoteinstaller
-#set (PlasmaRemoteInstaller_SRC
-#    publisher/remoteinstaller/remoteinstallerdialog.cpp
-#    publisher/remoteinstaller/remoteinstaller.cpp
-#    publisher/remoteinstaller/standalone/main.cpp
-#    publisher/remoteinstaller/standalone/plasmaremoteinstaller.cpp
-#)
+set (PlasmaRemoteInstaller_SRC
+    publisher/remoteinstaller/remoteinstallerdialog.cpp
+    publisher/remoteinstaller/remoteinstaller.cpp
+    publisher/remoteinstaller/standalone/main.cpp
+    publisher/remoteinstaller/standalone/plasmaremoteinstaller.cpp
+)
 
-#qt5_wrap_ui (PlasmaRemoteInstaller_SRC
-#   publisher/remoteinstaller/remoteinstaller.ui
-#)
+qt5_wrap_ui (PlasmaRemoteInstaller_SRC
+   publisher/remoteinstaller/remoteinstaller.ui
+)
 
-#add_executable(plasmaremoteinstaller ${PlasmaRemoteInstaller_SRC})
-#target_link_libraries(plasmaremoteinstaller
-#                      ${KDE4_KDEUI_LIBS}
-#                      ${KDE4_KIO_LIBRARY}
-#)
+add_executable(plasmaremoteinstaller ${PlasmaRemoteInstaller_SRC})
+target_link_libraries(plasmaremoteinstaller
+                      KF5::KIOCore
+                      KF5::KIOWidgets
+                      KF5::KDE4Support
+)
 
 #install(TARGETS plasmaremoteinstaller ${INSTALL_TARGETS_DEFAULT_ARGS})
 
diff --git a/plasmate/publisher/remoteinstaller/remoteinstaller.cpp \
b/plasmate/publisher/remoteinstaller/remoteinstaller.cpp index 5f4de97..a90d336 100644
--- a/plasmate/publisher/remoteinstaller/remoteinstaller.cpp
+++ b/plasmate/publisher/remoteinstaller/remoteinstaller.cpp
@@ -13,7 +13,6 @@
 #include <KIO/CopyJob>
 #include <KMessageBox>
 #include <KLocalizedString>
-#include <KStandardDirs>
 
 #include <QWidget>
 #include <QDir>
@@ -37,8 +36,8 @@ RemoteInstaller::RemoteInstaller(const QString& username, const QString& hostnam
     QString temporaryDirectory = QDir::tempPath();
     temporaryDirectory.append("/plasmaremoteinstaller");
 
-    QUrl tmpUrl = m_execUrl;
-    tmpUrl.addPath(temporaryDirectory);
+    QUrl tmpUrl;
+    tmpUrl.setPath(m_execUrl.path() + temporaryDirectory);
     if (!KIO::NetAccess::exists(tmpUrl, KIO::NetAccess::DestinationSide, m_widget)) {
         const bool ok = KIO::NetAccess::mkdir(tmpUrl, m_widget);
         if (!ok) {
@@ -68,7 +67,7 @@ RemoteInstaller::RemoteInstaller(const QString& username, const QString& hostnam
 void RemoteInstaller::doInstall()
 {
     //copy the project in the target's plasmate data directory
-    KIO::CopyJob *copy = KIO::copy(m_sourcePath, m_destinationPath);
+    KIO::CopyJob *copy = KIO::copy(QUrl::fromLocalFile(m_sourcePath), m_destinationPath);
 
     connect(copy, SIGNAL(result(KJob*)), this, SLOT(doPlasmaPkg(KJob*)));
 }
diff --git a/plasmate/publisher/remoteinstaller/remoteinstallerdialog.cpp \
b/plasmate/publisher/remoteinstaller/remoteinstallerdialog.cpp index 3b41b33..7c02210 100644
--- a/plasmate/publisher/remoteinstaller/remoteinstallerdialog.cpp
+++ b/plasmate/publisher/remoteinstaller/remoteinstallerdialog.cpp
@@ -22,9 +22,11 @@ RemoteInstallerDialog::RemoteInstallerDialog(QWidget* parent)
         m_installer(0)
 {
     QWidget *widget = new QWidget();
-    setButtons(QDialog::None);
     m_ui.setupUi(widget);
-    setMainWidget(widget);
+
+    QVBoxLayout *layout = new QVBoxLayout();
+    layout->addWidget(widget);
+    setLayout(layout);
 
     //we don't want the ok button to be enabled
     //before we get all the necessary information


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic