1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor(video): simplifies retrieval of primary screen

This commit reduces primary screen retrieval to a single static field
access as opposed to obtaining a runtime instance of the QApplication
object
This commit is contained in:
initramfs 2016-04-04 22:19:04 -04:00
parent 20a61e4cc3
commit 00947bc7ad
No known key found for this signature in database
GPG Key ID: 78B8BDF87E9EF0AF

View File

@ -133,7 +133,7 @@ CameraDevice* CameraDevice::open(QString devName, VideoMode mode)
}
else
{
QScreen* defaultScreen = static_cast<QGuiApplication*>(QGuiApplication::instance())->primaryScreen();
QScreen* defaultScreen = QApplication::primaryScreen();
qreal pixRatio;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))