Work around a bug in Qt where the wheelScrollLines setting is ignored. Fixes issue 2824.

This commit is contained in:
David Sansome 2012-05-13 17:41:38 +01:00
parent f606ae9ba8
commit 13e13ccd9a
1 changed files with 11 additions and 0 deletions

View File

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