Commit 48da4f0b authored by Michael Reeves's avatar Michael Reeves
Browse files

*Fix cruft left by automate QApplication convertion

*move workaround define to CMakeLists.txt
*silence extra QT errors.
*add QtWidgets
parent 04a502fa
......@@ -16,14 +16,18 @@ include(FeatureSummary)
include(ECMInstallIcons)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n DocTools)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
add_definitions(${QT_DEFINITIONS} ${KF5_DEFINITIONS})
#dummy define remove on full port to qt5
add_definitions(-DQ_DECL_CONSTRUCTOR_DEPRECATED=Q_DECL_DEPRECATED)
#remove unnneeded errors
remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_KEYWORDS)
include_directories(
${QT_INCLUDES} ${KF5_INCLUDES} ${Qt5Core_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS}
${QT_INCLUDES} ${KF5_INCLUDES} ${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
......
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS KIO)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS KIO WidgetsAddons)
add_library(kdiff3fileitemaction MODULE kdiff3fileitemaction.cpp)
target_link_libraries(kdiff3fileitemaction KIO ${LibKDiff3_LIBRARIES})
......
......@@ -20,12 +20,11 @@
#include "kdiff3fileitemaction.h"
#include <kapplication.h>
#include <kstandarddirs.h>
#include <QAction>
#include <QMenu>
#include <klocale.h>
#include <kgenericfactory.h>
#include <kgenericfactory.h>//FIXME:Port to non-broken header.
#include <kurl.h>
#include <kconfig.h>
#include <kconfiggroup.h>
......@@ -73,7 +72,6 @@ static KDiff3PluginHistory s_history;
K_PLUGIN_FACTORY(KDiff3FileItemActionFactory, registerPlugin<KDiff3FileItemAction>();)
K_EXPORT_PLUGIN(KDiff3FileItemActionFactory("kdiff3fileitemactionplugin"))
KDiff3FileItemAction::KDiff3FileItemAction (QObject* pParent, const QVariantList & /*args*/)
: KAbstractFileItemActionPlugin(pParent)
......
......@@ -20,7 +20,7 @@
#include "kdiff3plugin.h"
#include <kapplication.h>
#include <QApplication>
#include <kstandarddirs.h>
#include <QAction>
#include <kactionmenu.h>
......
......@@ -1000,7 +1000,7 @@ void KDiff3App::slotFileQuit()
if( !queryClose() )
return; // Don't quit
KApplication::exit( isFileSaved() || isDirComparison() ? 0 : 1 );
QApplication::exit( isFileSaved() || isDirComparison() ? 0 : 1 );
}
......
......@@ -27,7 +27,7 @@
#include <QScrollBar>
// include files for KDE
#include <kapplication.h>
#include <QApplication>
#include <kmainwindow.h>
#include <kaction.h>
#include <kurl.h>
......
......@@ -116,7 +116,7 @@ void KDiff3Shell::closeEvent(QCloseEvent*e)
e->accept();
bool bFileSaved = ((KDiff3App*)m_part->widget())->isFileSaved();
bool bDirCompare = ((KDiff3App*)m_part->widget())->isDirComparison();
KApplication::exit( bFileSaved || bDirCompare ? 0 : 1 );
QApplication::exit( bFileSaved || bDirCompare ? 0 : 1 );
}
else
e->ignore();
......
......@@ -22,7 +22,7 @@
#include <config-kdiff3.h>
#include <kapplication.h>
#include <QApplication>
#include <kparts/mainwindow.h>
class KToggleAction;
......
......@@ -15,7 +15,7 @@
* *
***************************************************************************/
#include <QApplication>
#include <KAboutData>
#include <klocale.h>
#include "kdiff3_shell.h"
......@@ -175,35 +175,35 @@ int main(int argc, char *argv[])
const KLocalizedString copyright = ki18n("(c) 2002-2012 Joachim Eibl");
const QByteArray& homePage = "http://kdiff3.sourceforge.net/";
const QByteArray& bugsAddress = "joachim.eibl" "@" "gmx.de";
K4AboutData aboutData( appName, appCatalog, i18nName,
KAboutData aboutData( appName, appCatalog, i18nName,
appVersion, description, KAboutLicense::GPL_V2, copyright, description,
homePage, bugsAddress );
aboutData.addAuthor(ki18n("Joachim Eibl"), KLocalizedString(), QByteArray("joachim.eibl" "@" "gmx.de"));
aboutData.addCredit(ki18n("Eike Sauer"), ki18n("Bugfixes, Debian package maintainer") );
aboutData.addCredit(ki18n("Sebastien Fricker"), ki18n("Windows installer") );
aboutData.addCredit(ki18n("Stephan Binner"), ki18n("i18n-help"), QByteArray("binner" "@" "kde.org") );
aboutData.addCredit(ki18n("Stefan Partheymueller"), ki18n("Clipboard-patch" ));
aboutData.addCredit(ki18n("David Faure"), ki18n("KIO-Help"), QByteArray("faure" "@" "kde.org" ));
aboutData.addCredit(ki18n("Bernd Gehrmann"), ki18n("Class CvsIgnoreList from Cervisia" ));
aboutData.addCredit(ki18n("Andre Woebbeking"), ki18n("Class StringMatcher" ));
aboutData.addCredit(ki18n("Michael Denio"), ki18n("Directory Equality-Coloring patch"));
aboutData.addCredit(ki18n("Manfred Koehler"), ki18n("Fix for slow startup on Windows"));
aboutData.addCredit(ki18n("Sergey Zorin"), ki18n("Diff Ext for Windows"));
aboutData.addCredit(ki18n("Paul Eggert, Mike Haertel, David Hayes, Richard Stallman, Len Tower"), ki18n("GNU-Diffutils"));
aboutData.addCredit(ki18n("Tino Boellsterling, Timothy Mee"), ki18n("Intensive test, use and feedback"));
aboutData.addCredit(ki18n("Michael Schmidt"), ki18n("Mac support"));
aboutData.addCredit(ki18n("Valentin Rusu"), ki18n("KDE4 porting"), QByteArray("kde" "@" "rusu.info"));
aboutData.addCredit(ki18n("Albert Astals Cid"), ki18n("KDE4 porting"), QByteArray("aacid" "@" "kde.org"));
aboutData.addCredit(ki18n("Silvan Scherrer"), ki18n("OS2 port") );
aboutData.addCredit(ki18n("Nigel Stewart"), ki18n("Cygwin support") );
aboutData.addCredit(ki18n("Maurice van der Pot"), ki18n("Framework for automated tests") );
aboutData.addAuthor(i18n("Joachim Eibl"), KLocalizedString(), QByteArray("joachim.eibl" "@" "gmx.de"));
aboutData.addCredit(i18n("Eike Sauer"), ki18n("Bugfixes, Debian package maintainer") );
aboutData.addCredit(i18n("Sebastien Fricker"), ki18n("Windows installer") );
aboutData.addCredit(i18n("Stephan Binner"), ki18n("i18n-help"), QByteArray("binner" "@" "kde.org") );
aboutData.addCredit(i18n("Stefan Partheymueller"), ki18n("Clipboard-patch" ));
aboutData.addCredit(i18n("David Faure"), ki18n("KIO-Help"), QByteArray("faure" "@" "kde.org" ));
aboutData.addCredit(i18n("Bernd Gehrmann"), ki18n("Class CvsIgnoreList from Cervisia" ));
aboutData.addCredit(i18n("Andre Woebbeking"), ki18n("Class StringMatcher" ));
aboutData.addCredit(i18n("Michael Denio"), ki18n("Directory Equality-Coloring patch"));
aboutData.addCredit(i18n("Manfred Koehler"), ki18n("Fix for slow startup on Windows"));
aboutData.addCredit(i18n("Sergey Zorin"), ki18n("Diff Ext for Windows"));
aboutData.addCredit(i18n("Paul Eggert, Mike Haertel, David Hayes, Richard Stallman, Len Tower"), ki18n("GNU-Diffutils"));
aboutData.addCredit(i18n("Tino Boellsterling, Timothy Mee"), ki18n("Intensive test, use and feedback"));
aboutData.addCredit(i18n("Michael Schmidt"), ki18n("Mac support"));
aboutData.addCredit(i18n("Valentin Rusu"), ki18n("KDE4 porting"), QByteArray("kde" "@" "rusu.info"));
aboutData.addCredit(i18n("Albert Astals Cid"), ki18n("KDE4 porting"), QByteArray("aacid" "@" "kde.org"));
aboutData.addCredit(i18n("Silvan Scherrer"), ki18n("OS2 port") );
aboutData.addCredit(i18n("Nigel Stewart"), ki18n("Cygwin support") );
aboutData.addCredit(i18n("Maurice van der Pot"), ki18n("Framework for automated tests") );
aboutData.addCredit(ki18n("+ Many thanks to those who reported bugs and contributed ideas!"));
aboutData.addCredit(i18n("+ Many thanks to those who reported bugs and contributed ideas!"));
QApplication app(argc, argv); // PORTING SCRIPT: move this to before the K4AboutData initialization
QCommandLineParser parser;
K4AboutData::setApplicationData(aboutData);
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
//PORTING SCRIPT: adapt aboutdata variable if necessary
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment