1
0
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:
Diadlo 2017-06-26 15:08:43 +03:00
parent af77efe2ba
commit dd9b324ec3
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
3 changed files with 1 additions and 20 deletions

View File

@ -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

View File

@ -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);

View File

@ -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();
}