Convert to makedefine01

This commit is contained in:
Nicolas Lécureuil 2012-08-24 03:16:04 +02:00
parent 97b99d3b06
commit d50d3a3162
19 changed files with 48 additions and 43 deletions

View File

@ -65,14 +65,14 @@
#include <kwindowsystem.h>
#include <kpushbutton.h>
#ifndef PLASMA_NO_KUTILS
#if !PLASMA_NO_KUTILS
#include <kcmoduleinfo.h>
#include <kcmoduleproxy.h>
#else
#include <kcmodule.h>
#endif
#ifndef PLASMA_NO_SOLID
#if !PLASMA_NO_SOLID
#include <solid/powermanagement.h>
#endif
@ -535,7 +535,7 @@ QString Applet::pluginName() const
bool Applet::shouldConserveResources() const
{
#ifndef PLASMA_NO_SOLID
#if !PLASMA_NO_SOLID
return Solid::PowerManagement::appShouldConserveResources();
#else
return true;
@ -1372,7 +1372,7 @@ void Applet::showConfigurationInterface()
}
foreach (const QString &kcm, kcmPlugins) {
#ifndef PLASMA_NO_KUTILS
#if !PLASMA_NO_KUTILS
KCModuleProxy *module = new KCModuleProxy(kcm);
if (module->realModule()) {
//preemptively load modules to prevent save() crashing on some kcms, like powerdevil ones

View File

@ -1,10 +1,12 @@
#cmakedefine ENABLE_REMOTE_WIDGETS
#cmakedefine QCA2_FOUND
#cmakedefine01 ENABLE_REMOTE_WIDGETS
#cmakedefine PLASMA_NO_KDEWEBKIT
#cmakedefine PLASMA_NO_KNEWSTUFF
#cmakedefine PLASMA_NO_SOLID
#cmakedefine PLASMA_NO_KIO
#cmakedefine PLASMA_NO_KUTILS
#cmakedefine PLASMA_NO_GLOBAL_SHORTCUTS
#cmakedefine01 PLASMA_NO_KDEWEBKIT
#cmakedefine01 PLASMA_NO_SOLID
#cmakedefine01 PLASMA_NO_KIO
#cmakedefine01 PLASMA_NO_KUTILS
#cmakedefine01 PLASMA_NO_GLOBAL_SHORTCUTS
#cmakedefine01 HAVE_X11
/*FIXME: Only used in CMakeLists.txt, to be removed ?*/
#cmakedefine01 PLASMA_NO_KNEWSTUFF
#cmakedefine01 QCA2_FOUND

View File

@ -46,7 +46,7 @@
#include <kwindowsystem.h>
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
#include "kio/jobclasses.h" // for KIO::JobFlags
#include "kio/job.h"
#include "kio/scheduler.h"

View File

@ -29,7 +29,7 @@
#include <config-plasma.h>
#ifndef PLASMA_NO_KDEWEBKIT
#if !PLASMA_NO_KDEWEBKIT
#include <kgraphicswebview.h>
#define GraphicsWebViewBase KGraphicsWebView
#else

View File

@ -27,7 +27,7 @@
#include "config-plasma.h"
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
#include <kio/job.h>
#endif

View File

@ -33,6 +33,7 @@
#include "scripting/scriptengine.h"
#include "private/containment_p.h"
#include <config-plasma.h>
#include <kaction.h>
#include <kkeysequencewidget.h>
@ -377,7 +378,7 @@ void AppletPrivate::addStandardConfigurationPages(KConfigDialog *dialog)
void AppletPrivate::addGlobalShortcutsPage(KConfigDialog *dialog)
{
#ifndef PLASMA_NO_GLOBAL_SHORTCUTS
#if !PLASMA_NO_GLOBAL_SHORTCUTS
if (isContainment) {
return;
}
@ -402,7 +403,7 @@ void AppletPrivate::addGlobalShortcutsPage(KConfigDialog *dialog)
void AppletPrivate::addPublishPage(KConfigDialog *dialog)
{
#ifdef ENABLE_REMOTE_WIDGETS
#if ENABLE_REMOTE_WIDGETS
QWidget *page = new QWidget;
publishUI.setupUi(page);
publishUI.publishCheckbox->setChecked(q->isPublished());
@ -444,7 +445,7 @@ void AppletPrivate::configDialogFinished()
}
}
#ifdef ENABLE_REMOTE_WIDGETS
#if ENABLE_REMOTE_WIDGETS
if (KConfigDialog::exists(configDialogId()) && publishUI.publishCheckbox) {
q->config().writeEntry("Share", publishUI.publishCheckbox->isChecked());

View File

@ -27,7 +27,7 @@
#include <qstandardpaths.h>
#include <kiconloader.h>
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
#include <krun.h>
#else
#include <QProcess>
@ -115,7 +115,7 @@ QList<QUrl> AssociatedApplicationManager::urls(const Plasma::Applet *applet) con
void AssociatedApplicationManager::run(Plasma::Applet *applet)
{
if (d->applicationNames.contains(applet)) {
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
bool success = KRun::run(d->applicationNames.value(applet), d->urlLists.value(applet), 0);
#else
QString execCommand = d->applicationNames.value(applet);
@ -133,7 +133,7 @@ void AssociatedApplicationManager::run(Plasma::Applet *applet)
}
} else if (d->urlLists.contains(applet) && !d->urlLists.value(applet).isEmpty()) {
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
KRun *krun = new KRun(d->urlLists.value(applet).first(), 0);
krun->setAutoDelete(true);
#else

View File

@ -36,7 +36,9 @@
#include <kurlmimedata.h>
#include <kwindowsystem.h>
#ifndef PLASMA_NO_KIO
#include "config-plasma.h"
#if !PLASMA_NO_KIO
#include "kio/jobclasses.h" // for KIO::JobFlags
#include "kio/job.h"
#include "kio/scheduler.h"
@ -407,7 +409,7 @@ void ContainmentPrivate::dropData(QPointF scenePos, QPoint screenPos, QGraphicsS
QObject::connect(AccessManager::self(), SIGNAL(finished(Plasma::AccessAppletJob*)),
q, SLOT(remoteAppletReady(Plasma::AccessAppletJob*)));
}
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
else {
QMimeDatabase db;
QMimeType mime = db.mimeTypeForUrl(url);
@ -530,7 +532,7 @@ void ContainmentPrivate::dropData(QPointF scenePos, QPoint screenPos, QGraphicsS
void ContainmentPrivate::clearDataForMimeJob(KIO::Job *job)
{
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
QObject::disconnect(job, 0, q, 0);
dropPoints.remove(job);
KMenu *choices = dropMenus.take(job);
@ -562,7 +564,7 @@ void ContainmentPrivate::remoteAppletReady(Plasma::AccessAppletJob *job)
void ContainmentPrivate::dropJobResult(KJob *job)
{
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
KIO::TransferJob* tjob = dynamic_cast<KIO::TransferJob*>(job);
if (!tjob) {
#ifndef NDEBUG
@ -584,7 +586,7 @@ void ContainmentPrivate::dropJobResult(KJob *job)
void ContainmentPrivate::mimeTypeRetrieved(KIO::Job *job, const QString &mimeType)
{
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
#ifndef NDEBUG
kDebug() << "Mimetype Job returns." << mimeType;
#endif

View File

@ -21,7 +21,7 @@
#include "config-plasma.h"
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
#include <kio/accessmanager.h>
#else
#include <QtNetwork/QNetworkAccessManager>
@ -29,7 +29,7 @@
QNetworkAccessManager *DeclarativeNetworkAccessManagerFactory::create(QObject *parent)
{
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
return new KIO::AccessManager(parent);
#else
return new QNetworkAccessManager(parent);

View File

@ -38,7 +38,7 @@
#include <QtJolie/Server>
#ifdef ENABLE_REMOTE_WIDGETS
#if ENABLE_REMOTE_WIDGETS
#include <QtCrypto>
#endif

View File

@ -26,7 +26,7 @@
#include <QSvgRenderer>
#include "config-plasma.h"
#ifndef PLASMA_NO_SOLID
#if !PLASMA_NO_SOLID
#include <solid/device.h>
#include <solid/deviceinterface.h>
#endif
@ -99,7 +99,7 @@ void WallpaperRenderThread::checkQueue()
return;
}
#ifndef PLASMA_NO_SOLID
#if !PLASMA_NO_SOLID
const int numProcs = qMax(1, Solid::Device::listFromType(Solid::DeviceInterface::Processor).count());
#else
const int numProcs = 1;

View File

@ -188,7 +188,7 @@ Applet *AccessAppletJob::applet() const
void AccessAppletJob::start()
{
#ifdef ENABLE_REMOTE_WIDGETS
#if ENABLE_REMOTE_WIDGETS
#ifndef NDEBUG
kDebug() << "fetching a plasmoid from location = " << d->location;
#endif

View File

@ -175,7 +175,7 @@ AccessManagerPrivate::AccessManagerPrivate(AccessManager *manager)
: q(manager),
browser(new DNSSD::ServiceBrowser("_plasma._tcp"))
{
#ifdef ENABLE_REMOTE_WIDGETS
#if ENABLE_REMOTE_WIDGETS
q->connect(browser, SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),
q, SLOT(slotAddService(DNSSD::RemoteService::Ptr)));
q->connect(browser, SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)),

View File

@ -25,7 +25,7 @@
#include <QtCore/QMap>
#include <QtCore/QString>
#ifdef ENABLE_REMOTE_WIDGETS
#if ENABLE_REMOTE_WIDGETS
#include <QtCrypto>
#endif
@ -68,7 +68,7 @@ class AuthorizationManagerPrivate
void addCredentials(const Credentials &identity);
void saveRules();
#ifdef ENABLE_REMOTE_WIDGETS
#if ENABLE_REMOTE_WIDGETS
QCA::Initializer initializer;
#endif

View File

@ -32,7 +32,7 @@
#include <kplugininfo.h>
#include <kservicetypetrader.h>
#ifndef PLASMA_NO_SOLID
#if !PLASMA_NO_SOLID
#include <solid/device.h>
#include <solid/deviceinterface.h>
#endif
@ -102,7 +102,7 @@ public:
KConfigGroup config = configGroup();
//The number of threads used scales with the number of processors.
#ifndef PLASMA_NO_SOLID
#if !PLASMA_NO_SOLID
const int numProcs =
qMax(Solid::Device::listFromType(Solid::DeviceInterface::Processor).count(), 1);
#else

View File

@ -83,7 +83,7 @@ void ServicePrivate::associatedGraphicsWidgetDestroyed(QObject *obj)
void ServicePrivate::publish(AnnouncementMethods methods, const QString &name, const KPluginInfo &metadata)
{
#ifdef ENABLE_REMOTE_WIDGETS
#if ENABLE_REMOTE_WIDGETS
if (!serviceProvider) {
AuthorizationManager::self()->d->prepareForServicePublication();

View File

@ -38,7 +38,7 @@
#include <kstandarddirs.h>
#include <klocale.h>
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
#include <kio/job.h>
#endif

View File

@ -28,7 +28,7 @@
#include <kiconloader.h>
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
#include <kfiledialog.h>
#else
#include <QFileDialog>
@ -157,7 +157,7 @@ void VideoWidgetPrivate::volumeChanged(qreal value)
void VideoWidgetPrivate::showOpenFileDialog()
{
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
openFile(KFileDialog::getOpenFileName());
#else
openFile(QFileDialog::getOpenFileName());

View File

@ -29,7 +29,7 @@
#include <config-plasma.h>
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
#include <kio/accessmanager.h>
#endif
#include <kdebug.h>
@ -78,7 +78,7 @@ WebView::WebView(QGraphicsItem *parent)
QPalette palette = qApp->palette();
palette.setBrush(QPalette::Base, Qt::transparent);
d->webView->page()->setPalette(palette);
#ifndef PLASMA_NO_KIO
#if !PLASMA_NO_KIO
d->webView->page()->setNetworkAccessManager(new KIO::AccessManager(d->webView->page()));
#endif