diff options
author | Alexander Golubev <[email protected]> | 2024-03-02 06:57:42 +0300 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2024-03-02 13:42:19 +0100 |
commit | 7b575b58e5c8e9427dcd9f748244a0881451bf51 (patch) | |
tree | 9333dad3356d9df0df06208c62fd9e6a0f334ea8 | |
parent | 53a1dfa82bee1dc579d38bf4bc4104e94c1ff7c5 (diff) | |
download | tqt3-7b575b58e5c8e9427dcd9f748244a0881451bf51.tar.gz tqt3-7b575b58e5c8e9427dcd9f748244a0881451bf51.zip |
avoid translating the /qt/XIMInputStyle options when saving into config
Also use "On The Spot" as the default when the setting in the config is
incorrect.
Signed-off-by: Alexander Golubev <[email protected]>
(cherry picked from commit 34587584ab80fd696cc9d73dda1326f175125ddf)
-rw-r--r-- | src/kernel/qapplication_x11.cpp | 8 | ||||
-rw-r--r-- | tools/qtconfig/mainwindow.cpp | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index e224f17ad..2cda2b8b3 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -1112,15 +1112,15 @@ bool TQApplication::x11_apply_settings() if (qt_xim_preferred_style == 0) { TQString ximInputStyle = settings.readEntry( "/qt/XIMInputStyle", - TQObject::trUtf8( "On The Spot" ) ).lower(); - if ( ximInputStyle == "on the spot" ) - qt_xim_preferred_style = XIMPreeditCallbacks | XIMStatusNothing; - else if ( ximInputStyle == "over the spot" ) + TQString::fromLatin1( "On The Spot" ) ).lower(); + if ( ximInputStyle == "over the spot" ) qt_xim_preferred_style = XIMPreeditPosition | XIMStatusNothing; else if ( ximInputStyle == "off the spot" ) qt_xim_preferred_style = XIMPreeditArea | XIMStatusArea; else if ( ximInputStyle == "root" ) qt_xim_preferred_style = XIMPreeditNothing | XIMStatusNothing; + else // ximInputStyle == "on the spot" or others + qt_xim_preferred_style = XIMPreeditCallbacks | XIMStatusNothing; } #endif diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp index b01b0dba0..9a1d0044a 100644 --- a/tools/qtconfig/mainwindow.cpp +++ b/tools/qtconfig/mainwindow.cpp @@ -376,7 +376,8 @@ MainWindow::MainWindow() rtlExtensions->setChecked( settings.readBoolEntry( "/qt/useRtlExtensions", FALSE ) ); #if defined(TQ_WS_X11) - inputStyle->setCurrentText( settings.readEntry( "/qt/XIMInputStyle", trUtf8( "On The Spot" ) ) ); + inputStyle->setCurrentText( trUtf8( + settings.readEntry( "/qt/XIMInputStyle", TQString::fromLatin1( "On The Spot" ) ) ) ); #else inputStyle->hide(); inputStyleLabel->hide(); @@ -517,7 +518,7 @@ void MainWindow::fileSave() str = "Off The Spot"; else if ( style == trUtf8( "Root" ) ) str = "Root"; - settings.writeEntry( "/qt/XIMInputStyle", inputStyle->currentText() ); + settings.writeEntry( "/qt/XIMInputStyle", str ); #if !defined(TQT_NO_IM_EXTENSIONS) TQString imSwitcher = settings.readEntry("/qt/DefaultInputMethodSwitcher", "imsw-multi"); |