本文整理汇总了C++中QScopedPointer::addStartupActions方法的典型用法代码示例。如果您正苦于以下问题:C++ QScopedPointer::addStartupActions方法的具体用法?C++ QScopedPointer::addStartupActions怎么用?C++ QScopedPointer::addStartupActions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QScopedPointer
的用法示例。
在下文中一共展示了QScopedPointer::addStartupActions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
if (!sisFile.isEmpty()) {
codaHandler.setActionType(ActionCopyInstall);
codaHandler.setCopyFileName(sisFile, dstName);
}
else if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) {
codaHandler.setActionType(ActionCopy);
codaHandler.setCopyFileName(uploadLocalFile, uploadRemoteFile);
}
if (!exeFile.isEmpty()) {
codaHandler.setActionType(ActionRun);
codaHandler.setAppFileName(QString("c:\\sys\\bin\\") + info.fileName());
codaHandler.setCommandLineArgs(cmdLine.join(QLatin1String(", ")));
}
if (!downloadRemoteFile.isEmpty() && !downloadLocalFile.isEmpty()) {
codaHandler.setActionType(ActionDownload);
codaHandler.setDownloadFileName(downloadRemoteFile, downloadLocalFile);
}
if (loglevel > 0)
outstream << "Connecting to target via " << serialPortName << endl;
if (timeout > 0)
codaHandler.setTimeout(timeout);
QObject::connect(OsSignalConverter::instance(), SIGNAL(terminate()), &codaHandler, SLOT(terminate()), Qt::QueuedConnection);
return codaHandler.run();
} else {
launcher.reset(new trk::Launcher(trk::Launcher::ActionPingOnly,
SymbianUtils::SymbianDeviceManager::instance()->acquireDevice(serialPortName)));
QStringList srcNames, dstNames;
if (!sisFile.isEmpty()) {
launcher->addStartupActions(trk::Launcher::ActionCopyInstall);
srcNames.append(sisFile);
dstNames.append(dstName);
launcher->setInstallFileNames(QStringList(dstName));
}
if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) {
launcher->addStartupActions(trk::Launcher::ActionCopy);
srcNames.append(uploadLocalFile);
dstNames.append(uploadRemoteFile);
}
launcher->setCopyFileNames(srcNames, dstNames);
if (!exeFile.isEmpty()) {
launcher->addStartupActions(trk::Launcher::ActionRun);
launcher->setFileName(QString("c:\\sys\\bin\\") + info.fileName());
launcher->setCommandLineArgs(cmdLine.join(QLatin1String(" ")));
}
if (!downloadRemoteFile.isEmpty() && !downloadLocalFile.isEmpty()) {
launcher->addStartupActions(trk::Launcher::ActionDownload);
launcher->setDownloadFileName(downloadRemoteFile, downloadLocalFile);
}
if (loglevel > 0)
outstream << "Connecting to target via " << serialPortName << endl;
launcher->setTrkServerName(serialPortName);
if (loglevel > 1)
launcher->setVerbose(1);
trkHandler.setLogLevel(loglevel);
trkHandler.setCrashLogging(crashlog);
trkHandler.setCrashLogPath(crashlogpath);
QObject::connect(launcher.data(), SIGNAL(copyingStarted(const QString &)), &trkHandler, SLOT(copyingStarted(const QString &)));
QObject::connect(launcher.data(), SIGNAL(canNotConnect(const QString &)), &trkHandler, SLOT(canNotConnect(const QString &)));