mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore(qt): Remove old qt code
This commit is contained in:
parent
af77efe2ba
commit
dd9b324ec3
|
@ -76,12 +76,7 @@ QStringList loadDefaultPaths()
|
|||
|
||||
// qTox exclusive emoticons
|
||||
QStandardPaths::StandardLocation location;
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
|
||||
location = QStandardPaths::AppDataLocation;
|
||||
#else
|
||||
#warning "Qt < 5.4.0 has a trouble with unicode symbols in path on few systems"
|
||||
location = QStandardPaths::DataLocation;
|
||||
#endif
|
||||
|
||||
QStringList locations = QStandardPaths::standardLocations(location);
|
||||
// system wide emoticons
|
||||
|
|
|
@ -160,13 +160,7 @@ CameraDevice* CameraDevice::open(QString devName, VideoMode mode)
|
|||
screen.setHeight(mode.height);
|
||||
} else {
|
||||
QScreen* defaultScreen = QApplication::primaryScreen();
|
||||
qreal pixRatio;
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
|
||||
pixRatio = defaultScreen->devicePixelRatio();
|
||||
#else
|
||||
pixRatio = 1.0;
|
||||
#endif
|
||||
qreal pixRatio = defaultScreen->devicePixelRatio();
|
||||
|
||||
screen = defaultScreen->size();
|
||||
// Workaround https://trac.ffmpeg.org/ticket/4574 by choping 1 px bottom and right
|
||||
|
@ -422,12 +416,7 @@ QVector<VideoMode> CameraDevice::getScreenModes()
|
|||
std::for_each(screens.begin(), screens.end(), [&result](QScreen* s) {
|
||||
QRect rect = s->geometry();
|
||||
QPoint p = rect.topLeft();
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
|
||||
qreal pixRatio = s->devicePixelRatio();
|
||||
#else
|
||||
qreal pixRatio = 1.0;
|
||||
#endif
|
||||
|
||||
VideoMode mode(rect.width() * pixRatio, rect.height() * pixRatio, p.x() * pixRatio,
|
||||
p.y() * pixRatio);
|
||||
|
|
|
@ -48,10 +48,7 @@ ScreenshotGrabber::ScreenshotGrabber()
|
|||
window->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
window->setFrameShape(QFrame::NoFrame);
|
||||
window->installEventFilter(this);
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
|
||||
pixRatio = QApplication::primaryScreen()->devicePixelRatio();
|
||||
#endif
|
||||
|
||||
setupScene();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user