Commit 168e842b authored by Laurent Montel's avatar Laurent Montel 😁

KDELibs4Support--

parent c6174d1e
......@@ -14,7 +14,7 @@ kconfig_add_kcfg_files(libgrantleetheme_SRCS
add_library(grantleetheme ${LIBRARY_TYPE} ${libgrantleetheme_SRCS})
generate_export_header(grantleetheme BASE_NAME grantleetheme)
target_link_libraries(grantleetheme KF5::NewStuff KF5::KDELibs4Support)
target_link_libraries(grantleetheme KF5::NewStuff KF5::I18n )
set_target_properties(grantleetheme PROPERTIES VERSION ${KDEPIM_LIB_VERSION} SOVERSION ${KDEPIM_LIB_SOVERSION})
install(TARGETS grantleetheme ${INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -26,10 +26,8 @@
#include <KLocalizedString>
#include <KNS3/DownloadDialog>
#include <KActionMenu>
#include <KStandardDirs>
#include <QDebug>
#include <QAction>
#include <KGlobal>
#include <QIcon>
#include <QDir>
......
add_executable( contactfieldstest contactfieldstest.cpp ../contactfields.cpp )
add_test( contactfieldstest contactfieldstest )
ecm_mark_as_test(kaddrebook-contactfieldstest)
target_link_libraries(contactfieldstest KF5::Abc Qt5::Test Qt5::Gui KF5::I18n KF5::KDELibs4Support)
target_link_libraries(contactfieldstest KF5::Abc Qt5::Test Qt5::Gui KF5::I18n)
......@@ -21,7 +21,7 @@
#include "contactfields.h"
#include <KLocalizedString>
#include <KUrl>
#include <QUrl>
QString ContactFields::label( Field field )
{
......@@ -286,7 +286,7 @@ void ContactFields::setValue( Field field, const QString &value, KABC::Addressee
contact.setMailer( value );
break;
case ContactFields::Homepage:
contact.setUrl( KUrl( value ) );
contact.setUrl( QUrl( value ) );
break;
case ContactFields::Organization:
contact.setOrganization( value );
......
......@@ -127,7 +127,7 @@ install(TARGETS kjotspart DESTINATION ${PLUGIN_INSTALL_DIR} )
set(kcm_kjots_PART_SRCS kcm_kjots.cpp ${kjots_config_SRCS} )
add_library(kcm_kjots MODULE ${kcm_kjots_PART_SRCS})
target_link_libraries(kcm_kjots KF5::KCMUtils KF5::KDELibs4Support)
target_link_libraries(kcm_kjots KF5::KCMUtils KF5::I18n)
install(TARGETS kcm_kjots DESTINATION ${PLUGIN_INSTALL_DIR})
......
......@@ -112,9 +112,6 @@
</item>
</layout>
</widget>
<includes>
<include location="local">kfontdialog.h</include>
</includes>
<resources/>
<connections>
<connection>
......
......@@ -23,7 +23,6 @@ extern "C"
{
Q_DECL_EXPORT KCModule *create_kjots_config_misc( QWidget *parent )
{
KComponentData instance( "kjots_config_misc" );
return new KJotsConfigMisc( instance, parent );
return new KJotsConfigMisc(parent );
}
}
......@@ -18,6 +18,8 @@
#include "kjotsconfigdlg.h"
#include <QPushButton>
#include <KConfig>
#include <KConfigGroup>
KJotsConfigDlg::KJotsConfigDlg( const QString & title, QWidget *parent )
: KCMultiDialog( parent )
......@@ -39,7 +41,7 @@ void KJotsConfigDlg::slotOk()
{
}
KJotsConfigMisc::KJotsConfigMisc( const KComponentData &inst, QWidget *parent )
KJotsConfigMisc::KJotsConfigMisc( QWidget *parent )
:KCModule( parent )
{
QHBoxLayout *lay = new QHBoxLayout( this );
......
......@@ -22,7 +22,6 @@
#include <kcmodule.h>
#include <kcmultidialog.h>
#include "ui_confpagemisc.h"
#include <KComponentData>
class confPageMisc : public QWidget, public Ui::confPageMisc
{
Q_OBJECT
......@@ -39,7 +38,7 @@ class KJotsConfigMisc : public KCModule
Q_OBJECT
public:
KJotsConfigMisc( const KComponentData &inst, QWidget *parent );
explicit KJotsConfigMisc( QWidget *parent );
/** Reimplemented from KCModule. */
virtual void load();
......
......@@ -291,6 +291,7 @@ generate_export_header(kmailprivate BASE_NAME kmail)
messageviewer
akonadi_next
sendlater
KF5::KDELibs4Support
)
set_target_properties(kmailprivate
......
......@@ -26,20 +26,34 @@
#include <QVBoxLayout>
#include <QRadioButton>
#include <QLabel>
#include <QDialogButtonBox>
#include <KConfigGroup>
#include <QPushButton>
IdentityAddVcardDialog::IdentityAddVcardDialog(const QStringList &shadowIdentities, QWidget *parent)
: KDialog(parent)
: QDialog(parent)
{
setCaption( i18n( "Create own vCard" ) );
setButtons( Ok|Cancel );
setDefaultButton( Ok );
setWindowTitle( i18n( "Create own vCard" ) );
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
okButton->setDefault(true);
setModal( true );
QWidget *mainWidget = new QWidget( this );
mainLayout->addWidget(mainWidget);
mainLayout->addWidget(buttonBox);
QVBoxLayout *vlay = new QVBoxLayout( mainWidget );
vlay->setSpacing( KDialog::spacingHint() );
vlay->setMargin( KDialog::marginHint() );
setMainWidget( mainWidget );
//TODO PORT QT5 vlay->setSpacing( QDialog::spacingHint() );
//TODO PORT QT5 vlay->setMargin( QDialog::marginHint() );
//PORTING: Verify that widget was added to mainLayout setMainWidget( mainWidget );
mButtonGroup = new QButtonGroup( this );
mButtonGroup->setObjectName(QLatin1String("buttongroup"));
......
......@@ -17,13 +17,13 @@
#ifndef IDENTITYADDVCARDDIALOG_H
#define IDENTITYADDVCARDDIALOG_H
#include <KDialog>
#include <QDialog>
#include <QUrl>
class QButtonGroup;
class KComboBox;
class KUrlRequester;
class IdentityAddVcardDialog: public KDialog
class IdentityAddVcardDialog: public QDialog
{
Q_OBJECT
public:
......
......@@ -10,7 +10,7 @@ set(dbustest_SRCS dbustest.cpp)
qt5_add_dbus_interfaces(dbustest_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml)
add_executable(dbustest ${dbustest_SRCS})
add_dependencies(dbustest kmail_xml)
target_link_libraries(dbustest KF5::KIOCore KF5::KDELibs4Support)
target_link_libraries(dbustest KF5::KIOCore KF5::I18n Qt5::DBus)
set( kmail_displaymenu_source displaymessageformatactionmenutest.cpp ../widgets/displaymessageformatactionmenu.cpp )
......@@ -22,5 +22,5 @@ target_link_libraries( displaymessageformatactionmenutest Qt5::Test messageview
set( kmail_identityaddvcarddialog_source identityaddvcarddialogtest.cpp ../identity/identityaddvcarddialog.cpp )
add_executable( identityaddvcarddialogtest ${kmail_identityaddvcarddialog_source})
ecm_mark_as_test(kmail-identityaddvcarddialogtest)
target_link_libraries( identityaddvcarddialogtest Qt5::Test KF5::KDELibs4Support )
target_link_libraries( identityaddvcarddialogtest Qt5::Test Qt5::Widgets KF5::Completion KF5::KIOWidgets KF5::I18n)
#include <qdebug.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <QCoreApplication>
#include <KAboutData>
#include <KLocalizedString>
#include <QCommandLineParser>
#include "kmailinterface.h"
#include "aboutdata.h"
//#include "aboutdata.h"
......@@ -13,10 +17,16 @@ int main(int argc,char **argv)
{
qDebug() << "Test KMail D-Bus interface.";
K4AboutData aboutData( "testKMailDBUS", 0,
ki18n("Test for KMail D-Bus interface"), "0.0" );
KCmdLineArgs::init(argc, argv, &aboutData);
KApplication app;
KAboutData aboutData( QLatin1String("testKMailDBUS"), i18n("Test for KMail D-Bus interface"), QLatin1String("0.0") );
QCoreApplication app(argc, argv);
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
//PORTING SCRIPT: adapt aboutdata variable if necessary
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
OrgKdeKmailKmailInterface kmailInterface( QLatin1String("org.kde.kmail"), QLatin1String("/KMail"), QDBusConnection::sessionBus());
kmailInterface.openComposer( QLatin1String("to 1"),QString(),QString(),QLatin1String("First test"),QLatin1String("simple openComp call"),0);
......
......@@ -42,7 +42,7 @@ ki18n_wrap_ui(kcm_apptsummary_PART_SRCS apptsummaryconfig_base.ui)
add_library(kcm_apptsummary MODULE ${kcm_apptsummary_PART_SRCS})
target_link_libraries(kcm_apptsummary korganizerprivate KF5::CalendarUtils KF5::KDELibs4Support KF5::KCMUtils)
target_link_libraries(kcm_apptsummary korganizerprivate KF5::CalendarUtils KF5::KCMUtils)
########### next target ###############
......@@ -52,7 +52,7 @@ ki18n_wrap_ui(kcm_todosummary_PART_SRCS todosummaryconfig_base.ui)
add_library(kcm_todosummary MODULE ${kcm_todosummary_PART_SRCS})
target_link_libraries(kcm_todosummary Qt5::Widgets KF5::KCMUtils KF5::KDELibs4Support)
target_link_libraries(kcm_todosummary Qt5::Widgets KF5::KCMUtils KF5::I18n)
########## Unit Test ###########
add_subdirectory(autotests)
......
......@@ -27,9 +27,9 @@
#include <KAboutData>
#include <KAcceleratorManager>
#include <KComponentData>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KConfig>
KCModule *create_todosummary( QWidget *parent, const char * )
{
......
......@@ -29,7 +29,6 @@
#include "ui_todosummaryconfig_base.h"
#include <KCModule>
#include <KComponentData>
extern "C"
{
Q_DECL_EXPORT KCModule *create_todosummary( QWidget *parent, const char * );
......
......@@ -35,7 +35,7 @@ ki18n_wrap_ui(kcm_sdsummary_PART_SRCS sdsummaryconfig_base.ui)
add_library(kcm_sdsummary MODULE ${kcm_sdsummary_PART_SRCS})
target_link_libraries(kcm_sdsummary Qt5::Widgets KF5::KCMUtils KF5::KDELibs4Support)
target_link_libraries(kcm_sdsummary Qt5::Widgets KF5::KCMUtils KF5::I18n)
########### install files ###############
......
......@@ -27,21 +27,20 @@
#include <KAboutData>
#include <KAcceleratorManager>
#include <KComponentData>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KConfig>
extern "C"
{
Q_DECL_EXPORT KCModule *create_sdsummary( QWidget *parent, const char * )
{
KComponentData inst( "kcmsdsummary" );
return new KCMSDSummary( inst, parent );
return new KCMSDSummary( parent );
}
}
KCMSDSummary::KCMSDSummary( const KComponentData &inst, QWidget *parent )
: KCModule( /*inst,*/ parent )
KCMSDSummary::KCMSDSummary(QWidget *parent )
: KCModule( parent )
{
setupUi( this );
......
......@@ -28,14 +28,13 @@
#include "ui_sdsummaryconfig_base.h"
#include <KCModule>
#include <KComponentData>
class KCMSDSummary : public KCModule, public Ui::SDSummaryConfig_Base
{
Q_OBJECT
public:
explicit KCMSDSummary( const KComponentData &inst, QWidget *parent = 0 );
explicit KCMSDSummary(QWidget *parent = 0 );
virtual void load();
virtual void save();
......
......@@ -23,7 +23,7 @@ set(kcm_kontactsummary_PART_SRCS kcmkontactsummary.cpp)
add_library(kcm_kontactsummary MODULE ${kcm_kontactsummary_PART_SRCS})
target_link_libraries(kcm_kontactsummary KF5::KCMUtils Qt5::Widgets KF5::KCMUtils KF5::KDELibs4Support KF5::KontactInterface)
target_link_libraries(kcm_kontactsummary KF5::KCMUtils Qt5::Widgets KF5::KCMUtils KF5::KontactInterface)
########### install files ###############
......
......@@ -25,7 +25,7 @@
#include <KAboutData>
#include <QDebug>
#include <KDirWatch>
#include <KFileDialog>
#include <QFileDialog>
#include <KMessageBox>
#include <KRun>
#include <KShell>
......@@ -36,6 +36,7 @@
#include <KDialog>
#include <KUrl>
#include <KGlobal>
#include <KFileDialog>
#include <QGroupBox>
#include <QHBoxLayout>
......@@ -139,9 +140,9 @@ class PageItem : public QTreeWidgetItem
bool mIsActive;
};
KCMDesignerFields::KCMDesignerFields( const KComponentData &instance, QWidget *parent,
KCMDesignerFields::KCMDesignerFields( QWidget *parent,
const QVariantList &args )
: KCModule( /*instance, */parent, args ),
: KCModule( parent, args ),
mPageView( 0 ),
mPagePreview( 0 ),
mPageDetails( 0 ),
......@@ -222,6 +223,7 @@ void KCMDesignerFields::loadUiFiles()
const QStringList list = KGlobal::dirs()->findAllResources( "data", uiPath() + QLatin1String("/*.ui"),
KStandardDirs::Recursive |
KStandardDirs::NoDuplicates );
for ( QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it ) {
new PageItem( mPageView, *it );
}
......
......@@ -25,7 +25,6 @@
#include <KCModule>
class KComponentData;
class QLabel;
class QPushButton;
......@@ -36,7 +35,7 @@ class KCMDesignerFields : public KCModule
{
Q_OBJECT
public:
explicit KCMDesignerFields( const KComponentData &instance, QWidget *parent=0,
explicit KCMDesignerFields( QWidget *parent=0,
const QVariantList &args=QVariantList() );
virtual void load();
......
......@@ -40,6 +40,9 @@ add_executable(testkcmdesignerfields testkcmdesignerfields.cpp ../kcmdesignerfie
set_target_properties(testkcmdesignerfields PROPERTIES COMPILE_FLAGS -DKDESRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/\\"")
target_link_libraries(testkcmdesignerfields
KF5::KIOCore
KF5::KDELibs4Support
KF5::I18n
Qt5::UiTools
KF5::KCMUtils
KF5::KIOWidgets
KF5::KDELibs4Support
)
......@@ -17,18 +17,20 @@
Boston, MA 02110-1301, USA.
*/
#include <K4AboutData>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <KAboutData>
#include <qdebug.h>
#include <klocale.h>
#include <QApplication>
#include <KLocalizedString>
#include <QCommandLineParser>
#include "kcmdesignerfields.h"
class MyDesignerFields : public KCMDesignerFields
{
public:
MyDesignerFields( const KComponentData &kcd ) : KCMDesignerFields( kcd, 0 ) {}
MyDesignerFields( ) : KCMDesignerFields( 0 ) {}
QString localUiDir() { return QString::fromLatin1( KDESRCDIR ); }
QString uiPath() { return QString::fromLatin1( KDESRCDIR ); }
void writeActivePages( const QStringList & ) {}
......@@ -38,12 +40,19 @@ class MyDesignerFields : public KCMDesignerFields
int main(int argc,char **argv)
{
K4AboutData aboutData( "testkcmdesignerfields", 0, KLocalizedString(), "0.1" );
KCmdLineArgs::init( argc, argv, &aboutData );
KApplication app;
MyDesignerFields *kcm = new MyDesignerFields( KComponentData( aboutData ) );
KAboutData aboutData( QLatin1String("testkcmdesignerfields"), QString(), QLatin1String("0.1") );
QApplication app(argc, argv);
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
//PORTING SCRIPT: adapt aboutdata variable if necessary
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
MyDesignerFields *kcm = new MyDesignerFields();
kcm->show();
app.exec();
......
......@@ -10,7 +10,7 @@ if(KMAIL_SUPPORTED)
add_executable( ksendemail ${ksendemail_SRCS})
add_dependencies( ksendemail kmail_xml )
target_link_libraries( ksendemail KF5::KIOCore KF5::KDELibs4Support)
target_link_libraries( ksendemail KF5::KIOCore Qt5::Widgets KF5::I18n KF5::WidgetsAddons Qt5::DBus)
install( TARGETS ksendemail ${INSTALL_TARGETS_DEFAULT_ARGS} )
......
......@@ -23,7 +23,7 @@ kde4_add_app_icon(ktnef_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/hi*-app-ktnef.png
ki18n_wrap_ui(ktnef_SRCS ui/attachpropertywidgetbase.ui)
add_executable(ktnef ${ktnef_SRCS})
target_link_libraries(ktnef KF5::Tnef KF5::KIOCore KF5::KDELibs4Support)
target_link_libraries(ktnef KF5::Tnef KF5::KIOCore )
install(TARGETS ktnef ${INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -27,7 +27,7 @@ set(ksieve_LIB_SRCS
add_library(ksieve ${LIBRARY_TYPE} ${ksieve_LIB_SRCS})
generate_export_header(ksieve BASE_NAME ksieve)
target_link_libraries(ksieve Qt5::Core KF5::KDELibs4Support)
target_link_libraries(ksieve Qt5::Core KF5::I18n)
set_target_properties(
ksieve PROPERTIES
......
......@@ -13,8 +13,9 @@ add_library(kmanagesieve ${LIBRARY_TYPE} ${kmanagesieve_LIB_SRCS})
generate_export_header(kmanagesieve BASE_NAME kmanagesieve)
target_link_libraries(kmanagesieve
KF5::KDELibs4Support
KF5::I18n
KF5::KIOCore
KF5::KIOWidgets
${Sasl2_LIBRARIES}
)
......
......@@ -32,7 +32,7 @@
#include <ksieve/error.h>
#include <klocale.h> // i18n
#include <KLocalizedString> // i18n
#include <climits> // UINT_MAX
......
add_definitions(-DTRANSLATION_DOMAIN=\"ktexteditorkabcbridge_plugin\")
set(ktexteditorkabcbridge_PART_SRCS ktexteditorkabcbridge.cpp )
add_library(ktexteditorkabcbridge MODULE ${ktexteditorkabcbridge_PART_SRCS})
target_link_libraries(ktexteditorkabcbridge KF5::Abc
KF5::PimIdentities KF5::KCMUtils KF5::KDELibs4Support)
target_link_libraries(ktexteditorkabcbridge KF5::Abc KF5::I18n
KF5::PimIdentities KF5::KCMUtils)
install(TARGETS ktexteditorkabcbridge DESTINATION ${PLUGIN_INSTALL_DIR})
......@@ -18,13 +18,11 @@
#include <kabc/addressee.h>
#include <kcmultidialog.h>
#include <kglobal.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <KPIMIdentities/kpimidentities/identity.h>
#include <KPIMIdentities/kpimidentities/identitymanager.h>
#include <QWidget>
#include <KLocale>
#include <KLocalizedString>
using namespace KPIMIdentities;
......
......@@ -54,7 +54,7 @@ install(TARGETS messageviewer_bodypartformatter_text_calendar DESTINATION ${PLU
set(messageviewer_bodypartformatter_text_xdiff_PART_SRCS text_xdiff.cpp)
add_library(messageviewer_bodypartformatter_text_xdiff MODULE ${messageviewer_bodypartformatter_text_xdiff_PART_SRCS})
target_link_libraries(messageviewer_bodypartformatter_text_xdiff Qt5::Core KF5::KDELibs4Support)
target_link_libraries(messageviewer_bodypartformatter_text_xdiff Qt5::Core KF5::I18n KF5::CoreAddons KF5::IconThemes KF5::WidgetsAddons)
install(TARGETS messageviewer_bodypartformatter_text_xdiff DESTINATION ${PLUGIN_INSTALL_DIR})
########### next target ###############
......
......@@ -34,22 +34,18 @@
#include <messageviewer/interfaces/bodyparturlhandler.h>
#include <messageviewer/htmlwriter/webkitparthtmlwriter.h>
#include <kglobal.h>
#include <klocale.h>
//#include <kglobal.h>
//#include <klocale.h>
#include <kstringhandler.h>
#include <kglobalsettings.h>
#include <kiconloader.h>
#include <qdebug.h>
#include <kmessagebox.h>
#include <kapplication.h>
#include <QUrl>
#include <QFile>
#include <QDir>
#include <QTextDocument>
#include <KLocale>
namespace {
......
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