Commit e0f5c1ec authored by Michael Reeves's avatar Michael Reeves
Browse files

*quash KAboutData related errors not ready for full porting yet.

parent 98eca7fd
########### kdiff3 KPart ###############
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Parts)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Parts CoreAddons)
set(kdiff3part_PART_SRCS
kdiff3_part.cpp
......@@ -25,7 +25,7 @@ add_library(kdiff3part MODULE ${kdiff3part_PART_SRCS})
set_target_properties(kdiff3part PROPERTIES DEFINE_SYMBOL KDIFF3_PART)
target_link_libraries(kdiff3part KF5::Parts ${QT_QT3SUPPORT_LIBRARY})
target_link_libraries(kdiff3part ${KDiff3_LIBRARIES} KF5::Parts KF5::CoreAddons ${QT_QT3SUPPORT_LIBRARY})
install(TARGETS kdiff3part DESTINATION ${PLUGIN_INSTALL_DIR} )
......@@ -39,7 +39,7 @@ set(kdiff3_SRCS
add_executable(kdiff3 ${kdiff3_SRCS})
target_link_libraries(kdiff3 KF5::Parts ${QT_QT3SUPPORT_LIBRARY} )
target_link_libraries(kdiff3 KF5::Parts ${QT_QT3SUPPORT_LIBRARY} ${KDiff3_LIBRARIES} )
install(TARGETS kdiff3 ${INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -159,7 +159,7 @@ KDiff3App::KDiff3App(QWidget* pParent, const char* /*name*/, KDiff3Part* pKDiff3
// This is just a convenience variable to make code that accesses options more readable
m_pOptions = &m_pOptionDialog->m_options;
m_pOptionDialog->readOptions( isPart() ? m_pKDiff3Part->componentData().config() : KGlobal::config() );
m_pOptionDialog->readOptions( isPart() ? ((K4AboutData)m_pKDiff3Part->componentData()).config() : KGlobal::config() );
// Option handling: Only when pParent==0 (no parent)
KCmdLineArgs *args = isPart() ? 0 : KCmdLineArgs::parsedArgs();
......@@ -652,7 +652,7 @@ void KDiff3App::saveOptions( KSharedConfigPtr config )
bool KDiff3App::queryClose()
{
saveOptions( isPart() ? m_pKDiff3Part->componentData().config() : KGlobal::config() );
saveOptions( isPart() ? ((K4AboutData)m_pKDiff3Part->componentData()).config() : KGlobal::config() );
if(m_bOutputModified)
{
......
......@@ -33,7 +33,7 @@
#include <kurl.h>
#include <kparts/mainwindow.h>
#include <ktoggleaction.h>
#include <K4AboutData>
// forward declaration of the KDiff3 classes
class OptionDialog;
......
......@@ -19,6 +19,7 @@
#include "kdiff3_part.h"
#include <K4AboutData>
#include <kcomponentdata.h>
#include <QAction>
#include <kstandardaction.h>
......@@ -70,7 +71,7 @@ KDiff3Part::~KDiff3Part()
{
if ( m_widget!=0 && ! m_bIsShell )
{
m_widget->saveOptions( m_widget->isPart() ? componentData().config() : KGlobal::config() );
m_widget->saveOptions( m_widget->isPart() ? ((K4AboutData)componentData()).config() : KGlobal::config() );
}
}
......
......@@ -22,6 +22,7 @@
#include <kparts/part.h>
#include <kparts/factory.h>
#include <kparts/readwritepart.h>
class QWidget;
class KDiff3App;
......@@ -77,7 +78,7 @@ private:
};
class KComponentData;
class KAboutData;
class K4AboutData;
class KDiff3PartFactory : public KParts::Factory
{
......@@ -93,7 +94,7 @@ public:
private:
static KComponentData* s_instance;
static KAboutData* s_about;
static K4AboutData* s_about;
};
#endif // _KDIFF3PART_H_
......@@ -24,6 +24,7 @@
#include <QApplication>
#include <kparts/mainwindow.h>
#include <kparts/readwritepart.h>
class KToggleAction;
......
......@@ -414,20 +414,20 @@ public:
#define KCmdLineLastOption {0,0,0}
class KAboutData
class K4AboutData
{
public:
enum LicenseKey { License_GPL, License_GPL_V2, License_Unknown };
//KAboutData( const QString& name, const QString& appName, const QString& version,
//K4AboutData( const QString& name, const QString& appName, const QString& version,
// const QString& description, int licence,
// const QString& copyright, int w, const QString& homepage, const QString& email);
KAboutData (const QByteArray &appName, const QByteArray &catalogName, const KLocalizedString &programName,
K4AboutData (const QByteArray &appName, const QByteArray &catalogName, const KLocalizedString &programName,
const QByteArray &version, const KLocalizedString &shortDescription, LicenseKey licenseType,
const KLocalizedString &copyrightStatement, const KLocalizedString &text,
const QByteArray &homePageAddress, const QByteArray &bugsEmailAddress);
KAboutData( const QString& name, const QString& appName, const QString& appName2, const QString& version );
K4AboutData( const QString& name, const QString& appName, const QString& appName2, const QString& version );
void addAuthor(const QString& name, const QString& task=0, const QString& email=0, const QString& weblink=0);
void addCredit(const QString& name, const QString& task=0, const QString& email=0, const QString& weblink=0);
......@@ -452,7 +452,7 @@ class KCmdLineArgs
{
public:
static KCmdLineArgs* parsedArgs();
static void init( int argc, char**argv, KAboutData* );
static void init( int argc, char**argv, K4AboutData* );
static void addCmdLineOptions( const KCmdLineOptions& options ); // Add our own options.
int count();
......@@ -563,13 +563,13 @@ typedef QProgressBar KProgress;
class KInstance : public QObject
{
public:
KInstance(KAboutData*){}
KInstance(K4AboutData*){}
};
class KComponentData : public QObject
{
public:
KComponentData(KAboutData*){}
KComponentData(K4AboutData*){}
KConfigGroup* config() {return 0;}
};
......
......@@ -16,7 +16,8 @@
***************************************************************************/
#include <QApplication>
#include <KAboutData>
#include <K4AboutData>
//#include <kaboutdata.h>
#include <klocale.h>
#include "kdiff3_shell.h"
#include <kstandarddirs.h>
......@@ -175,40 +176,40 @@ 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";
KAboutData aboutData( appName, appCatalog, i18nName,
appVersion, description, KAboutLicense::GPL_V2, copyright, description,
K4AboutData aboutData( appName, appCatalog, i18nName,
appVersion, description, K4AboutData::License_GPL_V2, copyright, description,
homePage, bugsAddress );
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.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.addCredit(i18n("+ Many thanks to those who reported bugs and contributed ideas!"));
aboutData.addCredit(ki18n("+ 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;
KAboutData::setApplicationData(aboutData);
K4AboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
//PORTING SCRIPT: adapt aboutdata variable if necessary
aboutData.setupCommandLine(&parser);
parser.process(app); // PORTING SCRIPT: move this to after any parser.addOption
aboutData.processCommandLine(&parser);
initialiseCmdLineArgs( options );
......@@ -232,9 +233,8 @@ int main(int argc, char *argv[])
parser.addPositionalArgument(QLatin1String("[File1]"), i18n("file1 to open (base, if not specified via --base)"));
parser.addPositionalArgument(QLatin1String("[File2]"), i18n("file2 to open"));
parser.addPositionalArgument(QLatin1String("[File3]"), i18n("file3 to open"));
parser.process(app); // PORTING SCRIPT: move this to after any parser.addOption
#ifdef KREPLACEMENTS_H
QString locale;
......
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