mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:19:05 +02:00
move update checking later in init, add menu option
This commit is contained in:
parent
65a63fb73e
commit
329253d8e4
3 changed files with 12 additions and 5 deletions
|
@ -212,10 +212,6 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
||||||
// call Menu getInstance static method to set up the menu
|
// call Menu getInstance static method to set up the menu
|
||||||
_window->setMenuBar(Menu::getInstance());
|
_window->setMenuBar(Menu::getInstance());
|
||||||
|
|
||||||
#if defined(Q_OS_MAC) && defined(QT_NO_DEBUG)
|
|
||||||
Menu::getInstance()->checkForUpdates();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_networkAccessManager = new QNetworkAccessManager(this);
|
_networkAccessManager = new QNetworkAccessManager(this);
|
||||||
|
|
||||||
QRect available = desktop()->availableGeometry();
|
QRect available = desktop()->availableGeometry();
|
||||||
|
@ -309,6 +305,11 @@ void Application::initializeGL() {
|
||||||
|
|
||||||
// update before the first render
|
// update before the first render
|
||||||
update(0.0f);
|
update(0.0f);
|
||||||
|
|
||||||
|
// now that things are drawn - if this is an OS X release build we can check for an update
|
||||||
|
#if defined(Q_OS_MAC) && defined(QT_NO_DEBUG)
|
||||||
|
Menu::getInstance()->checkForUpdates();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::paintGL() {
|
void Application::paintGL() {
|
||||||
|
|
|
@ -64,6 +64,11 @@ Menu::Menu() :
|
||||||
this,
|
this,
|
||||||
SLOT(editPreferences())))->setMenuRole(QAction::PreferencesRole);
|
SLOT(editPreferences())))->setMenuRole(QAction::PreferencesRole);
|
||||||
|
|
||||||
|
#if defined(Q_OS_MAC) && defined(QT_NO_DEBUG)
|
||||||
|
// show "Check for Updates" in the menu
|
||||||
|
(addActionToQMenuAndActionHash(fileMenu, MenuOption::CheckForUpdates, 0, this, SLOT(checkForUpdates())))->setMenuRole(QAction::ApplicationSpecificRole);
|
||||||
|
#endif
|
||||||
|
|
||||||
QMenu* pairMenu = addMenu("Pair");
|
QMenu* pairMenu = addMenu("Pair");
|
||||||
addActionToQMenuAndActionHash(pairMenu, MenuOption::Pair, 0, PairingHandler::getInstance(), SLOT(sendPairRequest()));
|
addActionToQMenuAndActionHash(pairMenu, MenuOption::Pair, 0, PairingHandler::getInstance(), SLOT(sendPairRequest()));
|
||||||
|
|
||||||
|
@ -463,7 +468,7 @@ void Menu::exportSettings() {
|
||||||
void Menu::checkForUpdates() {
|
void Menu::checkForUpdates() {
|
||||||
qDebug() << "Checking if there are available updates.\n";
|
qDebug() << "Checking if there are available updates.\n";
|
||||||
// if this is a release OS X build use fervor to check for an update
|
// if this is a release OS X build use fervor to check for an update
|
||||||
FvUpdater::sharedUpdater()->SetFeedURL("https://s3-us-west-1.amazonaws.com/highfidelity/appcast.xml");
|
FvUpdater::sharedUpdater()->SetFeedURL("file://localhost/Users/birarda/Desktop/appcast.xml");
|
||||||
FvUpdater::sharedUpdater()->CheckForUpdatesSilent();
|
FvUpdater::sharedUpdater()->CheckForUpdatesSilent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,7 @@ namespace MenuOption {
|
||||||
const QString Atmosphere = "Atmosphere";
|
const QString Atmosphere = "Atmosphere";
|
||||||
const QString Bandwidth = "Bandwidth Display";
|
const QString Bandwidth = "Bandwidth Display";
|
||||||
const QString BandwidthDetails = "Bandwidth Details";
|
const QString BandwidthDetails = "Bandwidth Details";
|
||||||
|
const QString CheckForUpdates = "Check for Updates...";
|
||||||
const QString Collisions = "Collisions";
|
const QString Collisions = "Collisions";
|
||||||
const QString CopyVoxels = "Copy Voxels";
|
const QString CopyVoxels = "Copy Voxels";
|
||||||
const QString CoverageMap = "Render Coverage Map";
|
const QString CoverageMap = "Render Coverage Map";
|
||||||
|
|
Loading…
Reference in a new issue