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

*More scripted porting

parent 46658e71
......@@ -42,6 +42,7 @@
#include <cmath>
#include <cstdlib>
#include <assert.h>
#include <QFileDialog>
class DiffTextWindowData
......@@ -1814,7 +1815,7 @@ void DiffTextWindowFrame::slotBrowseButtonClicked()
{
QString current = d->m_pFileSelection->text();
KUrl newURL = KFileDialog::getOpenUrl( current, 0, this);
KUrl newURL = QFileDialog::getOpenFileUrl(this, QString(), current, 0);
if ( !newURL.isEmpty() )
{
DiffTextWindow* pDTW = d->m_pDiffTextWindow;
......
......@@ -48,6 +48,7 @@
#include <assert.h>
//#include <konq_popupmenu.h>
#include <QFileDialog>
#include "guiutils.h"
......@@ -3243,7 +3244,7 @@ void DirectoryMergeWindow::slotSaveMergeState()
//slotStatusMsg(i18n("Saving Directory Merge State ..."));
//QString s = KFileDialog::getSaveUrl( QDir::currentPath(), 0, this, i18n("Save As...") ).url();
QString s = KFileDialog::getSaveFileName( QDir::currentPath(), 0, this, i18n("Save Directory Merge State As...") );
QString s = QFileDialog::getSaveFileName(this, i18n("Save Directory Merge State As...") , QDir::currentPath(), 0);
if(!s.isEmpty())
{
d->m_dirMergeStateFilename = s;
......
......@@ -259,13 +259,13 @@ bool KDiff3Part::saveFile()
// It's usually safe to leave the factory code alone.. with the
// notable exception of the KAboutData data
#include <kaboutdata.h>
// notable exception of the K4AboutData data
#include <K4AboutData>
#include <klocale.h>
#include <kglobal.h>
KComponentData* KDiff3PartFactory::s_instance = 0L;
KAboutData* KDiff3PartFactory::s_about = 0L;
K4AboutData* KDiff3PartFactory::s_about = 0L;
KDiff3PartFactory::KDiff3PartFactory()
: KParts::Factory()
......@@ -298,7 +298,7 @@ KComponentData* KDiff3PartFactory::instance()
{
if( !s_instance )
{
s_about = new KAboutData(QByteArray("kdiff3part"), QByteArray("kdiff3part"), ki18n("KDiff3Part"), QByteArray(VERSION));
s_about = new K4AboutData(QByteArray("kdiff3part"), QByteArray("kdiff3part"), ki18n("KDiff3Part"), QByteArray(VERSION));
s_about->addAuthor(ki18n("Joachim Eibl"), KLocalizedString(), QByteArray("joachim.eibl at gmx.de"));
s_instance = new KComponentData(s_about);
}
......
......@@ -55,7 +55,7 @@ static QString s_description;
static QString s_appName;
static QString s_version;
static QString s_homepage;
static KAboutData* s_pAboutData;
static K4AboutData* s_pAboutData;
#ifdef _WIN32
......@@ -357,7 +357,7 @@ void KMainWindow::slotAbout()
);
pTabWidget->addTab(tb1,i18n("&About"));
std::list<KAboutData::AboutDataEntry>::iterator i;
std::list<K4AboutData::AboutDataEntry>::iterator i;
QString s2;
for( i=s_pAboutData->m_authorList.begin(); i!=s_pAboutData->m_authorList.end(); ++i )
......@@ -872,7 +872,7 @@ QPixmap KIconLoader::loadIcon( const QString&, int, int )
return QPixmap();
}
KAboutData::KAboutData(const QByteArray &appName, const QByteArray & /*catalogName*/, const KLocalizedString & /*programName*/,
K4AboutData::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)
......@@ -885,16 +885,16 @@ KAboutData::KAboutData(const QByteArray &appName, const QByteArray & /*catalogNa
s_homepage = homePageAddress;
}
KAboutData::KAboutData( const QString& /*name*/, const QString& /*appName*/, const QString& /*appName2*/, const QString& /*version*/ )
K4AboutData::K4AboutData( const QString& /*name*/, const QString& /*appName*/, const QString& /*appName2*/, const QString& /*version*/ )
{
}
void KAboutData::addAuthor(const QString& name, const QString& task, const QString& email, const QString& weblink)
void K4AboutData::addAuthor(const QString& name, const QString& task, const QString& email, const QString& weblink)
{
m_authorList.push_back( AboutDataEntry( name, task, email, weblink) );
}
void KAboutData::addCredit(const QString& name, const QString& task, const QString& email, const QString& weblink)
void K4AboutData::addCredit(const QString& name, const QString& task, const QString& email, const QString& weblink)
{
m_creditList.push_back( AboutDataEntry( name, task, email, weblink) );
}
......@@ -939,9 +939,9 @@ KCmdLineArgs* KCmdLineArgs::parsedArgs() // static
return &s_cmdLineArgs;
}
QApplication app(argc, argv); // PORTING SCRIPT: move this to before the KAboutData initialization
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
......
......@@ -16,7 +16,7 @@
***************************************************************************/
#include <kaboutdata.h>
#include <K4AboutData>
#include <klocale.h>
#include "kdiff3_shell.h"
#include <kstandarddirs.h>
......@@ -83,7 +83,7 @@ void initialiseCmdLineArgs( KCmdLineOptions& options )
#ifdef _WIN32
#include <process.h>
#include <QApplication>
#include <KAboutData>
#include <K4AboutData>
#include <KLocalizedString>
#include <QCommandLineParser>
#include <QCommandLineOption>
......@@ -175,7 +175,7 @@ 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,
K4AboutData aboutData( appName, appCatalog, i18nName,
appVersion, description, KAboutLicense::GPL_V2, copyright, description,
homePage, bugsAddress );
......@@ -201,9 +201,9 @@ int main(int argc, char *argv[])
aboutData.addCredit(ki18n("+ Many thanks to those who reported bugs and contributed ideas!"));
QApplication app(argc, argv); // PORTING SCRIPT: move this to before the KAboutData initialization
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
......
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