[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE_3_1_BRANCH: kdepim/kpilot/kpilot
From: Adriaan de Groot <adridg () cs ! kun ! nl>
Date: 2003-02-28 21:30:44
[Download RAW message or body]
CVS commit by adridg:
Enable test mode properly for suitably instrumented conduits
M +38 -3 main-test.cc 1.21.4.6
--- kdepim/kpilot/kpilot/main-test.cc #1.21.4.5:1.21.4.6
@@ -39,4 +39,5 @@ static const char *test_id =
#include <qpushbutton.h>
#include <qhbox.h>
+#include <qtimer.h>
#include <kapplication.h>
@@ -75,4 +76,8 @@ static KCmdLineOptions kpilotoptions[] =
I18N_NOOP("*Really* run the conduit, not in test mode."),
0 } ,
+ { "F",0,0},
+ { "test-local",
+ "Run the conduit in file-test mode.",
+ 0 } ,
{0, 0, 0}
};
@@ -195,5 +200,5 @@ int execConduit(KCmdLineArgs *p)
if (p->isSet("test"))
{
- syncStack->prepare(ActionQueue::HotSyncMode| ActionQueue::TestMode);
+ syncStack->prepare(ActionQueue::HotSyncMode|ActionQueue::TestMode);
}
else
@@ -208,4 +213,27 @@ int execConduit(KCmdLineArgs *p)
}
+int testConduit(KCmdLineArgs *p)
+{
+ FUNCTIONSETUP;
+
+ // get --exec-conduit value
+ QString s = p->getOption("conduit-exec");
+ if (s.isEmpty()) return 1;
+
+ createLogWidget();
+ createLink();
+
+ syncStack = new ActionQueue(deviceLink);
+ syncStack->queueConduits(&KPilotConfig::getConfig(),
+ QStringList(s),
+ ActionQueue::FlagTest | ActionQueue::FlagLocal);
+
+ connectStack();
+
+ QTimer::singleShot(10,syncStack,SLOT(execConduit()));
+
+ return kapp->exec();
+}
+
int listConduits(KCmdLineArgs *)
@@ -280,5 +308,12 @@ int main(int argc, char **argv)
if (p->isSet("conduit-exec"))
{
+ if (p->isSet("test-local"))
+ {
+ return testConduit(p);
+ }
+ else
+ {
return execConduit(p);
+ }
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic