mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:56:50 +02:00
removed redundant this keyword
This commit is contained in:
parent
7c7cf667ae
commit
6b81620098
1 changed files with 8 additions and 16 deletions
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
InfoView::InfoView()
|
InfoView::InfoView()
|
||||||
{
|
{
|
||||||
this->settings()->setAttribute(QWebSettings::LocalContentCanAccessFileUrls, true);
|
settings()->setAttribute(QWebSettings::LocalContentCanAccessFileUrls, true);
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
QString resourcesPath = QCoreApplication::applicationDirPath() + "/../Resources";
|
QString resourcesPath = QCoreApplication::applicationDirPath() + "/../Resources";
|
||||||
|
@ -28,7 +28,7 @@ InfoView::InfoView()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QUrl url = QUrl::fromLocalFile(resourcesPath + "/html/interface-welcome-allsvg.html");
|
QUrl url = QUrl::fromLocalFile(resourcesPath + "/html/interface-welcome-allsvg.html");
|
||||||
this->load(url);
|
load(url);
|
||||||
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loaded(bool)));
|
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loaded(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ void InfoView::loaded(bool ok)
|
||||||
QString lastVersion = settings->value(SETTINGS_KEY_VERSION).toString();
|
QString lastVersion = settings->value(SETTINGS_KEY_VERSION).toString();
|
||||||
|
|
||||||
|
|
||||||
QWebFrame* mainFrame = this->page()->mainFrame();
|
QWebFrame* mainFrame = page()->mainFrame();
|
||||||
QWebElement versionTag = mainFrame->findFirstElement("#version");
|
QWebElement versionTag = mainFrame->findFirstElement("#version");
|
||||||
QString version = versionTag.attribute("value");
|
QString version = versionTag.attribute("value");
|
||||||
|
|
||||||
|
@ -54,19 +54,11 @@ void InfoView::loaded(bool ok)
|
||||||
}
|
}
|
||||||
|
|
||||||
QDesktopWidget* desktop = Application::getInstance()->desktop();
|
QDesktopWidget* desktop = Application::getInstance()->desktop();
|
||||||
|
|
||||||
int h = desktop->height();
|
int h = desktop->height();
|
||||||
this->resize(VIEW_FIXED_WIDTH, h * 0.8);
|
resize(VIEW_FIXED_WIDTH, h * 0.8);
|
||||||
|
move(desktop->screen()->rect().center() - rect().center());
|
||||||
int w = desktop->width();
|
setWindowModality(Qt::WindowModal);
|
||||||
int mw = this->size().width();
|
setWindowTitle(title());
|
||||||
int mh = this->size().height();
|
show();
|
||||||
int cw = (w/2) - (mw/2);
|
|
||||||
int ch = (h/2) - (mh/2);
|
|
||||||
this->move(cw, ch);
|
|
||||||
|
|
||||||
this->setWindowModality(Qt::WindowModal);
|
|
||||||
this->setWindowTitle(this->title());
|
|
||||||
this->show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue