summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBhushan Shah <[email protected]>2014-08-23 13:59:11 +0530
committerBhushan Shah <[email protected]>2014-08-23 13:59:11 +0530
commitd9703c1c1246298d6b9bb1ba4268539c40c2bc38 (patch)
treeadc5a2742b7a43d9978e9bd3c8d48be748ac7606
parent4fdffe35fbc013589c641afde2d169be667e1378 (diff)
Port app
-rw-r--r--CMakeLists.txt2
-rw-r--r--app/CMakeLists.txt24
-rw-r--r--app/batchextract.cpp6
-rw-r--r--app/main.cpp6
-rw-r--r--app/mainwindow.cpp6
-rw-r--r--app/mainwindow.h1
6 files changed, 24 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cfe1f07..cd141a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,6 @@ include_directories(
#add_subdirectory(plugins)
add_subdirectory(kerfuffle)
#add_subdirectory(part)
-#add_subdirectory(app)
+add_subdirectory(app)
#add_subdirectory(doc)
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index f1ef01b..b977e8c 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -35,16 +35,16 @@ install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/ark.appdata.xml DESTINATION share/app
install( FILES arkui.rc DESTINATION ${DATA_INSTALL_DIR}/ark )
########### konqueror ark_extract_here plugin ###############
-macro_optional_find_package( LibKonq )
-macro_log_feature( LIBKONQ_FOUND "LIBKONQ" "libkonq library" "kdebase" FALSE "" "Need to integrate in konqueror" )
-
-
-if (LIBKONQ_FOUND)
- set(extracthere_SRCS batchextract.cpp extractHereDndPlugin.cpp)
- kde4_add_plugin(extracthere WITH_PREFIX ${extracthere_SRCS})
- target_link_libraries(extracthere kerfuffle ${KDE4_KDECORE_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KFILE_LIBS} ${LIBKONQ_LIBRARY} )
- include_directories(${LIBKONQ_INCLUDE_DIR})
- install( TARGETS extracthere DESTINATION ${PLUGIN_INSTALL_DIR} )
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/ark_dndextract.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
-endif (LIBKONQ_FOUND)
+#macro_optional_find_package( LibKonq )
+#macro_log_feature( LIBKONQ_FOUND "LIBKONQ" "libkonq library" "kdebase" FALSE "" "Need to integrate in konqueror" )
+
+
+#if (LIBKONQ_FOUND)
+# set(extracthere_SRCS batchextract.cpp extractHereDndPlugin.cpp)
+# kde4_add_plugin(extracthere WITH_PREFIX ${extracthere_SRCS})
+# target_link_libraries(extracthere kerfuffle ${KDE4_KDECORE_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KFILE_LIBS} ${LIBKONQ_LIBRARY} )
+# include_directories(${LIBKONQ_INCLUDE_DIR})
+# install( TARGETS extracthere DESTINATION ${PLUGIN_INSTALL_DIR} )
+# install( FILES ${CMAKE_CURRENT_BINARY_DIR}/ark_dndextract.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
+#endif (LIBKONQ_FOUND)
diff --git a/app/batchextract.cpp b/app/batchextract.cpp
index 9e46635..9cfafb6 100644
--- a/app/batchextract.cpp
+++ b/app/batchextract.cpp
@@ -206,9 +206,9 @@ void BatchExtract::forwardProgress(KJob *job, unsigned long percent)
bool BatchExtract::addInput(const KUrl& url)
{
- Kerfuffle::Archive *archive = Kerfuffle::Archive::create(url.pathOrUrl(), this);
+ Kerfuffle::Archive *archive = Kerfuffle::Archive::create(url.toDisplayString(QUrl::PreferLocalFile), this);
- if ((archive == NULL) || (!QFileInfo(url.pathOrUrl()).exists())) {
+ if ((archive == NULL) || (!QFileInfo(url.toDisplayString(QUrl::PreferLocalFile)).exists())) {
m_failedFiles.append(url.fileName());
return false;
}
@@ -280,7 +280,7 @@ bool BatchExtract::showExtractDialog()
}
setAutoSubfolder(dialog.data()->autoSubfolders());
- setDestinationFolder(dialog.data()->destinationDirectory().pathOrUrl());
+ setDestinationFolder(dialog.data()->destinationDirectory().toDisplayString(QUrl::PreferLocalFile));
setOpenDestinationAfterExtraction(dialog.data()->openDestinationAfterExtraction());
setPreservePaths(dialog.data()->preservePaths());
diff --git a/app/main.cpp b/app/main.cpp
index bcd187d..65386e1 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -24,7 +24,7 @@
#include "batchextract.h"
#include "kerfuffle/addtoarchive.h"
-#include <KAboutData>
+#include <K4AboutData>
#include <KApplication>
#include <KCmdLineArgs>
#include <KDebug>
@@ -37,9 +37,9 @@ using Kerfuffle::AddToArchive;
int main(int argc, char **argv)
{
- KAboutData aboutData("ark", 0, ki18n("Ark"),
+ K4AboutData aboutData("ark", 0, ki18n("Ark"),
"2.19", ki18n("KDE Archiving tool"),
- KAboutData::License_GPL,
+ K4AboutData::License_GPL,
ki18n("(c) 1997-2011, The Various Ark Developers"),
KLocalizedString(),
"http://utils.kde.org/projects/ark"
diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
index aee8231..c8067a3 100644
--- a/app/mainwindow.cpp
+++ b/app/mainwindow.cpp
@@ -38,6 +38,7 @@
#include <KDebug>
#include <KEditToolBar>
#include <KShortcutsDialog>
+#include <KConfigGroup>
#include <QDragEnterEvent>
#include <QDragMoveEvent>
@@ -188,14 +189,15 @@ void MainWindow::editKeyBindings()
void MainWindow::editToolbars()
{
- saveMainWindowSettings(KGlobal::config()->group(QLatin1String("MainWindow")));
+ KConfigGroup cfg(KSharedConfig::openConfig(), "MainWindow");
+ saveMainWindowSettings(cfg);
QWeakPointer<KEditToolBar> dlg = new KEditToolBar(factory(), this);
dlg.data()->exec();
createGUI(m_part);
- applyMainWindowSettings(KGlobal::config()->group(QLatin1String("MainWindow")));
+ applyMainWindowSettings(KSharedConfig::openConfig()->group(QLatin1String("MainWindow")));
delete dlg.data();
}
diff --git a/app/mainwindow.h b/app/mainwindow.h
index 5dd7fb8..a739261 100644
--- a/app/mainwindow.h
+++ b/app/mainwindow.h
@@ -23,6 +23,7 @@
#define MAINWINDOW_H
#include <KParts/MainWindow>
+#include <KParts/OpenUrlArguments>
#include <KParts/ReadWritePart>
#include <KUrl>