Browse Source

chore(qt): Remove old qt code

pull/4493/head
Diadlo 8 years ago
parent
commit
dd9b324ec3
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
  1. 5
      src/persistence/smileypack.cpp
  2. 13
      src/video/cameradevice.cpp
  3. 3
      src/widget/tool/screenshotgrabber.cpp

5
src/persistence/smileypack.cpp

@ -76,12 +76,7 @@ QStringList loadDefaultPaths() @@ -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

13
src/video/cameradevice.cpp

@ -160,13 +160,7 @@ CameraDevice* CameraDevice::open(QString devName, VideoMode mode) @@ -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() @@ -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);

3
src/widget/tool/screenshotgrabber.cpp

@ -48,10 +48,7 @@ ScreenshotGrabber::ScreenshotGrabber() @@ -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…
Cancel
Save