aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Robert Förster2014-02-27 20:04:41 +0000
committerGravatar Robert Förster2014-02-27 20:04:41 +0000
commit17d7487d963e1a6f97bbe9b9665180c2eca00e9d (patch)
tree1f2dd50c5ca9658b73308842cdfc85216f82e21e /src
parent- some fixing for cmake 3 (diff)
downloadKVIrc-17d7487d963e1a6f97bbe9b9665180c2eca00e9d.tar.gz
KVIrc-17d7487d963e1a6f97bbe9b9665180c2eca00e9d.tar.bz2
KVIrc-17d7487d963e1a6f97bbe9b9665180c2eca00e9d.zip
- bump to QT 4.7 (we have no QT 4.8 specific code)
- QT4 on MSVC still needs qtmain, the cmake policy does not apply there - fix perl on windows, remove activestate hack, we don't support that anymore git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6371 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
-rw-r--r--src/kvirc/kernel/KviApplication.cpp14
-rw-r--r--src/kvirc/ui/KviInputEditor.cpp2
-rw-r--r--src/kvirc/ui/KviIrcView.cpp2
-rw-r--r--src/kvirc/ui/KviTopicWidget.cpp2
-rw-r--r--src/modules/file/libkvifile.cpp5
-rw-r--r--src/modules/objects/KvsObject_webView.cpp8
-rw-r--r--src/modules/perlcore/CMakeLists.txt11
7 files changed, 13 insertions, 31 deletions
diff --git a/src/kvirc/kernel/KviApplication.cpp b/src/kvirc/kernel/KviApplication.cpp
index 12718e784..354f26961 100644
--- a/src/kvirc/kernel/KviApplication.cpp
+++ b/src/kvirc/kernel/KviApplication.cpp
@@ -296,12 +296,14 @@ void KviApplication::setup()
QDir::addSearchPath("audio",szPath);
#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
- //need to load image plugins:(
- QString szPluginsDir;
- getGlobalKvircDirectory(szPluginsDir,None,"qt-plugins/");
- setLibraryPaths(QStringList(szPluginsDir));
- //KviMessageBox::information(libraryPaths().join(";"));
- //qDebug("%1",loader.isLoaded());
+ #if (QT_VERSION < 0x050000)
+ // need to load image plugins :( QT5 uses "plugins" in application dir
+ QString szPluginsDir;
+ getGlobalKvircDirectory(szPluginsDir,None,"qt-plugins/");
+ setLibraryPaths(QStringList(szPluginsDir));
+ //KviMessageBox::information(libraryPaths().join(";"));
+ //qDebug("%1",loader.isLoaded());
+ #endif
#endif
QString szSplashDisableFile;
diff --git a/src/kvirc/ui/KviInputEditor.cpp b/src/kvirc/ui/KviInputEditor.cpp
index 13b13f880..53f9e0d32 100644
--- a/src/kvirc/ui/KviInputEditor.cpp
+++ b/src/kvirc/ui/KviInputEditor.cpp
@@ -169,9 +169,7 @@ void KviInputEditor::applyOptions(bool bRefreshCachedMetrics)
//set the font
QFont newFont(KVI_OPTION_FONT(KviOption_fontInput));
newFont.setKerning(false);
-#if QT_VERSION >= 0x040700
newFont.setStyleStrategy(QFont::StyleStrategy(newFont.styleStrategy() | QFont::ForceIntegerMetrics));
-#endif
setFont(newFont);
if(bRefreshCachedMetrics)
diff --git a/src/kvirc/ui/KviIrcView.cpp b/src/kvirc/ui/KviIrcView.cpp
index 3e970ec2b..eb36f6328 100644
--- a/src/kvirc/ui/KviIrcView.cpp
+++ b/src/kvirc/ui/KviIrcView.cpp
@@ -421,9 +421,7 @@ void KviIrcView::setFont(const QFont &f)
QFont newFont(f);
newFont.setKerning(false);
-#if QT_VERSION >= 0x040700
newFont.setStyleStrategy(QFont::StyleStrategy(newFont.styleStrategy() | QFont::ForceIntegerMetrics));
-#endif
QWidget::setFont(newFont);
update();
}
diff --git a/src/kvirc/ui/KviTopicWidget.cpp b/src/kvirc/ui/KviTopicWidget.cpp
index 227a307d5..ebd5be019 100644
--- a/src/kvirc/ui/KviTopicWidget.cpp
+++ b/src/kvirc/ui/KviTopicWidget.cpp
@@ -165,9 +165,7 @@ void KviTopicWidget::applyOptions()
m_pLabel->applyOptions();
QFont newFont(KVI_OPTION_FONT(KviOption_fontLabel));
newFont.setKerning(false);
-#if QT_VERSION >= 0x040700
newFont.setStyleStrategy(QFont::StyleStrategy(newFont.styleStrategy() | QFont::ForceIntegerMetrics));
-#endif
setFont(newFont);
if(m_pCompletionBox)
m_pCompletionBox->setFont(newFont);
diff --git a/src/modules/file/libkvifile.cpp b/src/modules/file/libkvifile.cpp
index 9b0329f83..b9cd95acc 100644
--- a/src/modules/file/libkvifile.cpp
+++ b/src/modules/file/libkvifile.cpp
@@ -1588,11 +1588,8 @@ static bool file_kvs_fnc_time(KviKvsModuleFunctionCall * c)
c->warning(__tr2qs("Unknown option '%1', defaulting to 'm'").arg(szType));
time = f.lastModified();
}
-#if QT_VERSION >= 0x040700
+
c->returnValue()->setInteger(time.toMSecsSinceEpoch() / 1000);
-#else
- c->returnValue()->setInteger(time.toTime_t());
-#endif
return true;
}
diff --git a/src/modules/objects/KvsObject_webView.cpp b/src/modules/objects/KvsObject_webView.cpp
index c7a1560f6..ba1758b45 100644
--- a/src/modules/objects/KvsObject_webView.cpp
+++ b/src/modules/objects/KvsObject_webView.cpp
@@ -104,30 +104,22 @@ void KviKvsDownloadHandler::slotReadyRead()
const char * const webattributes_tbl[] = {
"JavascriptEnabled",
-#if (QT_VERSION >= 0x040700)
"PluginsEnabled",
-#endif
"JavascriptCanOpenWindows",
"JavascriptCanAccessClipboard",
"ZoomTextOnly"
-#if (QT_VERSION >= 0x040700)
,
"LocalContentCanAccessFileUrls"
-#endif
};
const QWebSettings::WebAttribute webattributes_cod[] = {
QWebSettings::JavascriptEnabled,
-#if (QT_VERSION >= 0x040700)
QWebSettings::PluginsEnabled,
-#endif
QWebSettings::JavascriptCanOpenWindows,
QWebSettings::JavascriptCanAccessClipboard,
QWebSettings::ZoomTextOnly
-#if (QT_VERSION >= 0x040700)
,
QWebSettings::LocalContentCanAccessFileUrls
-#endif
};
const char * const findflag_tbl[] = {
diff --git a/src/modules/perlcore/CMakeLists.txt b/src/modules/perlcore/CMakeLists.txt
index cf8031e24..968b88db3 100644
--- a/src/modules/perlcore/CMakeLists.txt
+++ b/src/modules/perlcore/CMakeLists.txt
@@ -23,6 +23,10 @@ if(COMPILE_PERL_SUPPORT)
OUTPUT_VARIABLE PERL_LINK_FLAGS
)
+if(MSVC)
+ # breaks with -nodefaultlib
+ string(REPLACE " -nodefaultlib" "" PERL_LINK_FLAGS "${PERL_LINK_FLAGS}")
+endif()
# Remove new line characters
string(REGEX REPLACE "(\r?\n)+$" "" PERL_LINK_FLAGS "${PERL_LINK_FLAGS}")
# Remove leading and trailing spaces (string strip)
@@ -32,13 +36,6 @@ endif()
include(${CMAKE_SOURCE_DIR}/cmake/module.rules.txt)
if(COMPILE_PERL_SUPPORT)
- if(WANT_DEBUG AND MSVC)
- # Activestates Perl does not support Run-Time Error checks
- string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT})
- string(REPLACE "/RTC1" "" CMAKE_C_FLAGS_DEBUG_INIT ${CMAKE_C_FLAGS_DEBUG_INIT})
- string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
- string(REPLACE "/RTC1" "" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
- endif()
set_target_properties(${kvi_module_name} PROPERTIES COMPILE_FLAGS ${PERL_COMPILE_FLAGS})
set_target_properties(${kvi_module_name} PROPERTIES LINK_FLAGS "${MODULE_ADDITIONAL_LINK_FLAGS}")
target_link_libraries(${kvi_module_name} ${LIBS} "${PERL_LINK_FLAGS}")