aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Szymon Tomasz Stefanek2015-08-24 04:19:29 +0200
committerGravatar Szymon Tomasz Stefanek2015-08-24 04:19:29 +0200
commit1797a667df88e420abeeaccad1e4a93020057153 (patch)
tree2c3954052c6d50e0ae887802dcbe9c58c32f896c /src/modules
parentAppveyor: fix typo (diff)
downloadKVIrc-1797a667df88e420abeeaccad1e4a93020057153.tar.gz
KVIrc-1797a667df88e420abeeaccad1e4a93020057153.tar.bz2
KVIrc-1797a667df88e420abeeaccad1e4a93020057153.zip
Add basic KDE5 support.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/dialog/libkvidialog.cpp2
-rw-r--r--src/modules/filetransferwindow/FileTransferWindow.cpp32
-rw-r--r--src/modules/objects/CMakeLists.txt2
-rw-r--r--src/modules/term/TermWidget.cpp4
-rw-r--r--src/modules/term/TermWidget.h2
-rw-r--r--src/modules/term/TermWindow.cpp2
-rw-r--r--src/modules/term/TermWindow.h2
-rw-r--r--src/modules/term/libkviterm.cpp10
8 files changed, 28 insertions, 28 deletions
diff --git a/src/modules/dialog/libkvidialog.cpp b/src/modules/dialog/libkvidialog.cpp
index 8c3fa7a2d..f71413354 100644
--- a/src/modules/dialog/libkvidialog.cpp
+++ b/src/modules/dialog/libkvidialog.cpp
@@ -540,7 +540,7 @@ void KviKvsCallbackFileDialog::done(int code)
if(code == QDialog::Accepted)
{
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
if(mode() == KFile::ExistingOnly)
#else
if(fileMode() == QFileDialog::ExistingFiles)
diff --git a/src/modules/filetransferwindow/FileTransferWindow.cpp b/src/modules/filetransferwindow/FileTransferWindow.cpp
index 73294aeca..2f69c49a8 100644
--- a/src/modules/filetransferwindow/FileTransferWindow.cpp
+++ b/src/modules/filetransferwindow/FileTransferWindow.cpp
@@ -51,13 +51,13 @@
#include <QWidgetAction>
#include <QHeaderView>
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
#include <kurl.h>
#include <krun.h>
#include <kmimetype.h>
#include <kmimetypetrader.h>
#include <kiconloader.h>
-#endif //COMPILE_KDE_SUPPORT
+#endif //COMPILE_KDE4_SUPPORT
#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
#include <shellapi.h>
@@ -430,11 +430,11 @@ void FileTransferWindow::rightButtonPressed(FileTransferItem *it,const QPoint &p
tmp += "</nobr><br>";
}
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
tmp += "<nobr>Mime: ";
tmp += KMimeType::findByPath(szFile)->name();
tmp += "</nobr>";
-#endif //COMPILE_KDE_SUPPORT
+#endif //COMPILE_KDE4_SUPPORT
QWidgetAction * pWaction = new QWidgetAction(m_pLocalFilePopup);
QLabel * l = new QLabel(tmp, m_pLocalFilePopup);
@@ -443,7 +443,7 @@ void FileTransferWindow::rightButtonPressed(FileTransferItem *it,const QPoint &p
pWaction->setDefaultWidget(l);
m_pLocalFilePopup->addAction(pWaction);
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
QString mimetype = KMimeType::findByPath(szFile)->name();
KService::List offers = KMimeTypeTrader::self()->query(mimetype,"Application");
@@ -475,7 +475,7 @@ void FileTransferWindow::rightButtonPressed(FileTransferItem *it,const QPoint &p
m_pLocalFilePopup->addAction(__tr2qs_ctx("Open &Location","filetransferwindow"),this,SLOT(openLocalFileFolder()));
m_pLocalFilePopup->addAction(__tr2qs_ctx("Terminal at Location","filetransferwindow"),this,SLOT(openLocalFileTerminal()));
m_pLocalFilePopup->addSeparator();
-#endif //COMPILE_KDE_SUPPORT
+#endif //COMPILE_KDE4_SUPPORT
//-| Grifisx & Noldor |-
#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
@@ -546,7 +546,7 @@ KviFileTransfer * FileTransferWindow::selectedTransfer()
void FileTransferWindow::openFilePopupActivated(QAction *pAction)
{
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
bool bOk=false;
int ip = pAction->data().toInt(&bOk);
if(!bOk || ip < 0)
@@ -576,7 +576,7 @@ void FileTransferWindow::openFilePopupActivated(QAction *pAction)
}
idx++;
}
-#endif //COMPILE_KDE_SUPPORT
+#endif //COMPILE_KDE4_SUPPORT
}
void FileTransferWindow::openLocalFileTerminal()
@@ -596,7 +596,7 @@ void FileTransferWindow::openLocalFileTerminal()
system(tmp.toLocal8Bit().data());
#else
// G&N end
- #ifdef COMPILE_KDE_SUPPORT
+ #ifdef COMPILE_KDE4_SUPPORT
KviFileTransfer * t = selectedTransfer();
if(!t)return;
QString tmp = t->localFileName();
@@ -610,7 +610,7 @@ void FileTransferWindow::openLocalFileTerminal()
tmp.append("\"");
KRun::runCommand(tmp,g_pMainWindow);
- #endif //COMPILE_KDE_SUPPORT
+ #endif //COMPILE_KDE4_SUPPORT
#endif
}
@@ -646,7 +646,7 @@ void FileTransferWindow::openLocalFile()
ShellExecute(0,"open",tmp.toLocal8Bit().data(),NULL,NULL,SW_SHOWNORMAL); //You have to link the shell32.lib
#else
// G&N end
- #ifdef COMPILE_KDE_SUPPORT
+ #ifdef COMPILE_KDE4_SUPPORT
KviFileTransfer * t = selectedTransfer();
if(!t)return;
QString tmp = t->localFileName();
@@ -666,7 +666,7 @@ void FileTransferWindow::openLocalFile()
lst.append(url);
KRun::run(*offer, lst, g_pMainWindow);
- #endif //COMPILE_KDE_SUPPORT
+ #endif //COMPILE_KDE4_SUPPORT
#endif
}
@@ -683,7 +683,7 @@ void FileTransferWindow::openLocalFileWith()
WinExec(tmp.toLocal8Bit().data(),SW_SHOWNORMAL);
#else
// G&N end
- #ifdef COMPILE_KDE_SUPPORT
+ #ifdef COMPILE_KDE4_SUPPORT
KviFileTransfer * t = selectedTransfer();
if(!t)return;
QString tmp = t->localFileName();
@@ -694,7 +694,7 @@ void FileTransferWindow::openLocalFileWith()
url.setPath(tmp);
lst.append(url);
KRun::displayOpenWithDialog(lst,g_pMainWindow);
- #endif //COMPILE_KDE_SUPPORT
+ #endif //COMPILE_KDE4_SUPPORT
#endif
}
@@ -721,7 +721,7 @@ void FileTransferWindow::openLocalFileFolder()
WinExec(tmp.toLocal8Bit().data(), SW_MAXIMIZE);
#else
// G&N end
- #ifdef COMPILE_KDE_SUPPORT
+ #ifdef COMPILE_KDE4_SUPPORT
KviFileTransfer * t = selectedTransfer();
if(!t)return;
QString tmp = t->localFileName();
@@ -740,7 +740,7 @@ void FileTransferWindow::openLocalFileFolder()
url.setPath(tmp);
lst.append(url);
KRun::run(*offer,lst,g_pMainWindow);
- #endif //COMPILE_KDE_SUPPORT
+ #endif //COMPILE_KDE4_SUPPORT
#endif
}
diff --git a/src/modules/objects/CMakeLists.txt b/src/modules/objects/CMakeLists.txt
index 964ec1c80..07a34e523 100644
--- a/src/modules/objects/CMakeLists.txt
+++ b/src/modules/objects/CMakeLists.txt
@@ -54,7 +54,7 @@ set(
KvsObject_xmlreader.cpp
)
-if(NOT CMAKE_STATUS_QT_VERSION VERSION_LESS 5.0.0)
+if(CMAKE_RESULT_USING_QT5)
# Qt >= 5.0.0 has no QHttp/QFtp implementation. We use the external code provided by digia.
set(
kviobjects_SRCS
diff --git a/src/modules/term/TermWidget.cpp b/src/modules/term/TermWidget.cpp
index 46589f6ad..9508e5bbb 100644
--- a/src/modules/term/TermWidget.cpp
+++ b/src/modules/term/TermWidget.cpp
@@ -35,7 +35,7 @@
#include <QToolTip>
#include <QTimer>
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
#include "klibloader.h"
#include "kparts/part.h"
@@ -172,4 +172,4 @@
}
-#endif //COMPILE_KDE_SUPPORT
+#endif //COMPILE_KDE4_SUPPORT
diff --git a/src/modules/term/TermWidget.h b/src/modules/term/TermWidget.h
index ed12e90b1..c941cef3d 100644
--- a/src/modules/term/TermWidget.h
+++ b/src/modules/term/TermWidget.h
@@ -26,7 +26,7 @@
#include "kvi_settings.h"
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
#include <QFrame>
#include <QLabel>
#include <QPushButton>
diff --git a/src/modules/term/TermWindow.cpp b/src/modules/term/TermWindow.cpp
index 70fcf8a30..b8a69cec8 100644
--- a/src/modules/term/TermWindow.cpp
+++ b/src/modules/term/TermWindow.cpp
@@ -25,7 +25,7 @@
#include "TermWindow.h"
#include "TermWidget.h"
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
#include "KviIconManager.h"
#include "KviOptions.h"
#include "KviLocale.h"
diff --git a/src/modules/term/TermWindow.h b/src/modules/term/TermWindow.h
index a0f5367c6..46c6971d7 100644
--- a/src/modules/term/TermWindow.h
+++ b/src/modules/term/TermWindow.h
@@ -26,7 +26,7 @@
#include "kvi_settings.h"
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
#include "KviWindow.h"
#include "KviCString.h"
diff --git a/src/modules/term/libkviterm.cpp b/src/modules/term/libkviterm.cpp
index b87024a27..d4ea13546 100644
--- a/src/modules/term/libkviterm.cpp
+++ b/src/modules/term/libkviterm.cpp
@@ -30,7 +30,7 @@
#include <QSplitter>
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
#include "TermWidget.h"
#include "TermWindow.h"
@@ -65,7 +65,7 @@ KviModule * g_pTermModule = 0;
static bool term_kvs_cmd_open(KviKvsModuleCommandCall * c)
{
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
c->module()->lock(); // multiple locks are allowed
if(c->hasSwitch('m',"mdi"))
{
@@ -76,7 +76,7 @@ static bool term_kvs_cmd_open(KviKvsModuleCommandCall * c)
w->show();
}
#else
- c->warning("Terminal emulation service not supported (non-KDE compilation)");
+ c->warning("Terminal emulation service not supported (non-KDE4 compilation)");
#endif
return true;
}
@@ -85,7 +85,7 @@ static bool term_module_init(KviModule * m)
{
g_pTermModule = m;
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
g_pTermWidgetList = new KviPointerList<TermWidget>;
g_pTermWidgetList->setAutoDelete(false);
g_pTermWindowList = new KviPointerList<TermWindow>;
@@ -98,7 +98,7 @@ static bool term_module_init(KviModule * m)
static bool term_module_cleanup(KviModule *)
{
-#ifdef COMPILE_KDE_SUPPORT
+#ifdef COMPILE_KDE4_SUPPORT
while(g_pTermWidgetList->first())
delete g_pTermWidgetList->first();
delete g_pTermWidgetList;