mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 17:03:58 +02:00
Parenting the info view to the menu is preventing the menu from showing up on
Linux. Let's try not doing that.
This commit is contained in:
parent
9c320e9827
commit
94d6f00f65
4 changed files with 12 additions and 11 deletions
|
@ -321,7 +321,7 @@ void Application::initializeGL() {
|
|||
Menu::getInstance()->checkForUpdates();
|
||||
#endif
|
||||
|
||||
InfoView::showFirstTime(Menu::getInstance());
|
||||
InfoView::showFirstTime();
|
||||
}
|
||||
|
||||
void Application::paintGL() {
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
#define SETTINGS_VERSION_KEY "info-version"
|
||||
#define MAX_DIALOG_HEIGHT_RATIO 0.9
|
||||
|
||||
InfoView::InfoView(bool forced, QWidget* parent) :
|
||||
QWebView(parent),
|
||||
InfoView::InfoView(bool forced) :
|
||||
_forced(forced) {
|
||||
|
||||
switchToResourcesParentIfRequired();
|
||||
|
@ -29,12 +28,12 @@ InfoView::InfoView(bool forced, QWidget* parent) :
|
|||
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loaded(bool)));
|
||||
}
|
||||
|
||||
void InfoView::showFirstTime(QWidget* parent) {
|
||||
new InfoView(false, parent);
|
||||
void InfoView::showFirstTime() {
|
||||
new InfoView(false);
|
||||
}
|
||||
|
||||
void InfoView::forcedShow(QWidget* parent) {
|
||||
new InfoView(true, parent);
|
||||
void InfoView::forcedShow() {
|
||||
new InfoView(true);
|
||||
}
|
||||
|
||||
bool InfoView::shouldShow() {
|
||||
|
@ -59,6 +58,7 @@ bool InfoView::shouldShow() {
|
|||
|
||||
void InfoView::loaded(bool ok) {
|
||||
if (!ok || !shouldShow()) {
|
||||
deleteLater();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -72,5 +72,6 @@ void InfoView::loaded(bool ok) {
|
|||
resize(mainFrame->contentsSize().width(), height);
|
||||
move(desktop->screen()->rect().center() - rect().center());
|
||||
setWindowTitle(title());
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
show();
|
||||
}
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
class InfoView : public QWebView {
|
||||
Q_OBJECT
|
||||
public:
|
||||
static void showFirstTime(QWidget* parent);
|
||||
static void forcedShow(QWidget* parent);
|
||||
static void showFirstTime();
|
||||
static void forcedShow();
|
||||
|
||||
private:
|
||||
InfoView(bool forced, QWidget* parent);
|
||||
InfoView(bool forced);
|
||||
bool _forced;
|
||||
bool shouldShow();
|
||||
|
||||
|
|
|
@ -684,7 +684,7 @@ bool Menu::isVoxelModeActionChecked() {
|
|||
}
|
||||
|
||||
void Menu::aboutApp() {
|
||||
InfoView::forcedShow(this);
|
||||
InfoView::forcedShow();
|
||||
}
|
||||
|
||||
void updateDSHostname(const QString& domainServerHostname) {
|
||||
|
|
Loading…
Reference in a new issue