本文整理汇总了C++中Updater::checkForNewVersion方法的典型用法代码示例。如果您正苦于以下问题:C++ Updater::checkForNewVersion方法的具体用法?C++ Updater::checkForNewVersion怎么用?C++ Updater::checkForNewVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Updater
的用法示例。
在下文中一共展示了Updater::checkForNewVersion方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QMainWindow
MainWindow::MainWindow(QWidget *parent)
: QMainWindow (parent)
{
QString serverApp = QCoreApplication::applicationDirPath();
Updater *updater = new Updater();
#ifdef Q_OS_MAC
// applicationDirPath() does not return bundle, but executable inside bundle
serverApp.replace("Ostinato.app", "drone.app");
#endif
#ifdef Q_OS_WIN32
serverApp.append("/drone.exe");
#else
serverApp.append("/drone");
#endif
localServer_ = new QProcess(this);
localServer_->setProcessChannelMode(QProcess::ForwardedChannels);
localServer_->start(serverApp, QStringList());
pgl = new PortGroupList;
portsWindow = new PortsWindow(pgl, this);
statsWindow = new PortStatsWindow(pgl, this);
portsDock = new QDockWidget(tr("Ports and Streams"), this);
portsDock->setObjectName("portsDock");
portsDock->setFeatures(
portsDock->features() & ~QDockWidget::DockWidgetClosable);
statsDock = new QDockWidget(tr("Statistics"), this);
statsDock->setObjectName("statsDock");
statsDock->setFeatures(
statsDock->features() & ~QDockWidget::DockWidgetClosable);
setupUi(this);
menuFile->insertActions(menuFile->actions().at(0), portsWindow->actions());
statsDock->setWidget(statsWindow);
addDockWidget(Qt::BottomDockWidgetArea, statsDock);
portsDock->setWidget(portsWindow);
addDockWidget(Qt::TopDockWidgetArea, portsDock);
QRect geom = appSettings->value(kApplicationWindowGeometryKey).toRect();
if (!geom.isNull())
setGeometry(geom);
QByteArray layout = appSettings->value(kApplicationWindowLayout)
.toByteArray();
if (layout.size())
restoreState(layout, 0);
connect(actionFileExit, SIGNAL(triggered()), this, SLOT(close()));
connect(actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
connect(updater, SIGNAL(newVersionAvailable(QString)),
this, SLOT(onNewVersion(QString)));
updater->checkForNewVersion();
#if 0
{
DbgThread *dbg = new DbgThread(pgl);
dbg->start();
}
#endif
}