[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kpilot/port-to-trunk/kpilot
From: Laurent Montel <montel () kde ! org>
Date: 2007-05-07 12:00:15
Message-ID: 1178539215.111616.31693.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 662059 by mlaurent:
Now kpilotdaemon compiles but I commented a lot of code
need to fix it now :)
M +3 -3 CMakeLists.txt
M +47 -13 pilotDaemon.cc
M +1 -1 pilotDaemon.h
--- branches/work/kpilot/port-to-trunk/kpilot/CMakeLists.txt #662058:662059
@@ -96,9 +96,9 @@
QT4_ADD_DBUS_INTERFACE(kpilotDaemon_SRCS org.kde.kpilot.logger.xml \
logfile_interface) QT4_ADD_DBUS_INTERFACE(kpilotDaemon_SRCS \
org.kde.kpilot.kpilot.xml kpilot_interface)
-#kde4_automoc(${kpilotDaemon_SRCS})
-#kde4_add_executable(kpilotDaemon ${kpilotDaemon_SRCS})
-#target_link_libraries(kpilotDaemon ${QT_LIBRARIES} kpilot ${KDE4_KDEUI_LIBS} \
${KDE4_KIO_LIBS}) +kde4_automoc(${kpilotDaemon_SRCS})
+kde4_add_executable(kpilotDaemon ${kpilotDaemon_SRCS})
+target_link_libraries(kpilotDaemon ${QT_LIBRARIES} kpilot ${KDE4_KDEUI_LIBS} \
${KDE4_KIO_LIBS} ${KDE4_KDE3SUPPORT_LIBS})
###
#
--- branches/work/kpilot/port-to-trunk/kpilot/pilotDaemon.cc #662058:662059
@@ -38,6 +38,7 @@
#include <qpixmap.h>
//Added by qt3to4:
#include <Q3CString>
+#include <Q3Dict>
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QMouseEvent>
@@ -94,7 +95,10 @@
setObjectName("pilotDaemon");
FUNCTIONSETUP;
setupWidget();
- setAcceptDrops(true);
+#ifdef __GNUC__
+#warning "kde4 port it"
+#endif
+ //setAcceptDrops(true);
}
/* virtual */ void PilotDaemonTray::dragEnterEvent(QDragEnterEvent * e)
@@ -124,12 +128,15 @@
/* virtual */ void PilotDaemonTray::mousePressEvent(QMouseEvent * e)
{
FUNCTIONSETUP;
-
+#ifdef __GNUC__
+#warning "kde4 port"
+#endif
+#if 0
switch (e->button())
{
case Qt::RightButton:
{
- KMenu *menu = contextMenu();
+ QMenu *menu = contextMenu();
contextMenuAboutToShow(menu);
menu->popup(e->globalPos());
}
@@ -140,6 +147,7 @@
default:
KSystemTray::mousePressEvent(e);
}
+#endif
}
/* virtual */ void PilotDaemonTray::closeEvent(QCloseEvent *)
@@ -151,16 +159,19 @@
void PilotDaemonTray::setupWidget()
{
FUNCTIONSETUP;
-
+#ifdef __GNUC__
+#warning "kde4 port"
+#endif
+#if 0
KIconLoader::global()->addAppDir( CSL1("kpilot") );
icons[Normal] = loadIcon( CSL1("kpilotDaemon") );
icons[Busy] = loadIcon( CSL1("busysync") );
icons[NotListening] = loadIcon( CSL1("nosync") );
-
+#endif
slotShowNotListening();
QTimer::singleShot(2000,this,SLOT(slotShowNormal()));
- KMenu *menu = contextMenu();
+ QMenu *menu = contextMenu();
menuKPilotItem = menu->insertItem(i18n("Start &KPilot"), daemon,
SLOT(slotRunKPilot()));
@@ -168,7 +179,7 @@
daemon, SLOT(slotRunConfig()));
menu->insertSeparator();
- fSyncTypeMenu = new KMenu(menu);
+ fSyncTypeMenu = new QMenu(menu);
fSyncTypeMenu->setObjectName("sync_type_menu");
QString once = i18n("Appended to names of sync types to indicate the sync will \
happen just one time"," (once)"); #define MI(a) fSyncTypeMenu->insertItem( \
@@ -193,12 +204,16 @@
menu->insertItem(i18n("Next &Sync"),fSyncTypeMenu);
KHelpMenu *help = new KHelpMenu(menu,aboutData);
+#ifdef __GNUC__
+#warning "kde4 port"
+#endif
+#if 0
menu->insertItem(
KIconLoader::global()->loadIconSet(CSL1("help"),KIcon::Small,0,true),
i18n("&Help"),help->menu(),false /* no whatsthis */);
+#endif
-
#ifdef DEBUG
DEBUGKPILOT << fname << ": Finished getting icons" << endl;
#endif
@@ -232,7 +247,10 @@
{
WARNINGKPILOT << "Icon #"<<i<<" is NULL!" << endl;
}
- setPixmap(icons[i]);
+#ifdef __GNUC__
+#warning "kde4 port it"
+#endif
+ //setPixmap(icons[i]);
fCurrentIcon = i;
}
@@ -303,8 +321,8 @@
QDBusConnection::sessionBus().registerObject("/Daemon", this);
//TODO verify it
- fLogInterface = new OrgKdeKpilotDaemonInterface("org.kde.kpilot.kpilot", \
"/KPilot", QDBusConnection::sessionBus());
- fLogFileInterface = new OrgKdeKpilotDaemonInterface("org.kde.kpilot.daemon", \
"/Daemon", QDBusConnection::sessionBus()); + fLogInterface = new \
OrgKdeKpilotLoggerInterface("org.kde.kpilot.kpilot", "/KPilot", \
QDBusConnection::sessionBus()); + fLogFileInterface = new \
OrgKdeKpilotLoggerInterface("org.kde.kpilot.daemon", "/Daemon", \
QDBusConnection::sessionBus()); fKPilotInterface = new \
OrgKdeKpilotKpilotInterface("org.kde.kpilot.kpilot", \
"/KPilot",QDBusConnection::sessionBus()); FUNCTIONSETUP;
@@ -345,8 +363,10 @@
void PilotDaemon::addInstallFiles(const QStringList &l)
{
FUNCTIONSETUP;
-
- fInstaller->addFiles( l, fTray );
+#ifdef __GNUC__
+#warning "kde4 port it"
+#endif
+ //fInstaller->addFiles( l, fTray );
}
int PilotDaemon::getPilotSpeed()
@@ -648,7 +668,9 @@
fPostSyncAction |= Quit;
break;
}
+#ifdef __GNUC__
#warning "kde4 port"
+#endif
//emitDCOPSignal( "kpilotDaemonStatusChanged()", QByteArray() );
}
@@ -820,7 +842,9 @@
typedef enum { NotLocked=0, Locked=1, DCOPError=2 } KDesktopLockStatus;
static KDesktopLockStatus isKDesktopLockRunning()
{
+#ifdef __GNUC__
#warning "kde4 port it"
+#endif
#if 0
if (!KPilotSettings::screenlockSecure()) return NotLocked;
@@ -868,7 +892,9 @@
OrgKdeKpilotLoggerInterface &log,
OrgKdeKpilotLoggerInterface &filelog)
{
+#ifdef __GNUC__
#warning "kde4 port it"
+#endif
#if 0
kpilot.daemonStatus(KPilotDCOP::StartOfHotSync);
log.logStartSync();
@@ -881,7 +907,9 @@
OrgKdeKpilotKpilotInterface &kpilot)
{
FUNCTIONSETUP;
+#ifdef __GNUC__
#warning "kde4 port it"
+#endif
#if 0
/**
* If KPilot is busy with something - like configuring
@@ -1270,7 +1298,9 @@
//TODO verify
if ( QDBusConnection::sessionBus().interface()->isServiceRegistered( \
"org.kde.kpilot" ) ) {
+#ifdef __GNUC__
#warning "kde4 port it"
+#endif
//client->send("kpilot", "kpilot-mainwindow#1", "raise()",QString::null);
//client->send("kpilot", "KPilotIface", "configure()", QString::null);
}
@@ -1295,7 +1325,9 @@
tipText.append( CSL1("</qt>") );
fTray->setToolTip(tipText);
+#ifdef __GNUC__
#warning "kde4 port it"
+#endif
#if 0
emitDCOPSignal( "kpilotDaemonStatusChanged()", QByteArray() );
// emit the same dcop signal but including the information needed by Kontact to \
update its kpilot summary widget @@ -1360,7 +1392,9 @@
if (!KUniqueApplication::start())
{
if (p->isSet("device")){
+#ifdef __GNUC__
#warning "kde4 port it"
+#endif
#if 0
// tell the running kpilotDaemon to use
// this device now
--- branches/work/kpilot/port-to-trunk/kpilot/pilotDaemon.h #662058:662059
@@ -81,7 +81,7 @@
/**
* Menu of sync types.
*/
- Q3PopupMenu *fSyncTypeMenu;
+ QMenu *fSyncTypeMenu;
protected slots:
void slotShowAbout();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic