Work around a bug in Qt where the wheelScrollLines setting is ignored. Fixes issue 2824.
This commit is contained in:
parent
f606ae9ba8
commit
13e13ccd9a
11
src/main.cpp
11
src/main.cpp
|
@ -303,6 +303,17 @@ int main(int argc, char *argv[]) {
|
||||||
IncreaseFDLimit();
|
IncreaseFDLimit();
|
||||||
|
|
||||||
QtSingleApplication a(argc, argv);
|
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
|
#ifdef Q_OS_DARWIN
|
||||||
QCoreApplication::setLibraryPaths(
|
QCoreApplication::setLibraryPaths(
|
||||||
QStringList() << QCoreApplication::applicationDirPath() + "/../PlugIns");
|
QStringList() << QCoreApplication::applicationDirPath() + "/../PlugIns");
|
||||||
|
|
Loading…
Reference in New Issue