From 13e13ccd9a959327b88b59c5dc8b5d83d74a937c Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sun, 13 May 2012 17:41:38 +0100 Subject: [PATCH] Work around a bug in Qt where the wheelScrollLines setting is ignored. Fixes issue 2824. --- src/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 4a5916ad5..ec0b0f865 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -303,6 +303,17 @@ int main(int argc, char *argv[]) { IncreaseFDLimit(); QtSingleApplication a(argc, argv); + + // A bug in Qt means the wheel_scroll_lines setting gets ignored and replaced + // with the default value of 3 in QApplicationPrivate::initialize. + { + QSettings qt_settings(QSettings::UserScope, "Trolltech"); + qt_settings.beginGroup("Qt"); + QApplication::setWheelScrollLines( + qt_settings.value("wheelScrollLines", + QApplication::wheelScrollLines()).toInt()); + } + #ifdef Q_OS_DARWIN QCoreApplication::setLibraryPaths( QStringList() << QCoreApplication::applicationDirPath() + "/../PlugIns");