summaryrefslogtreecommitdiff
path: root/core/launcher/inputmethods.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/inputmethods.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/inputmethods.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp
index a0e8939..7e99796 100644
--- a/core/launcher/inputmethods.cpp
+++ b/core/launcher/inputmethods.cpp
@@ -91,7 +91,3 @@ InputMethods::InputMethods( QWidget *parent ) :
{
- Config cfg( "Launcher" );
- cfg.setGroup( "InputMethods" );
- inputWidgetStyle = QWidget::WStyle_Customize | QWidget::WStyle_StaysOnTop | QWidget::WGroupLeader | QWidget::WStyle_Tool;
- inputWidgetStyle |= cfg.readBoolEntry( "Float", false ) ? QWidget::WStyle_DialogBorder : 0;
- inputWidgetWidth = cfg.readNumEntry( "Width", 100 );
+ readConfig();
@@ -534,3 +530,3 @@ void InputMethods::showKbd( bool on )
int height = QMIN( mkeyboard->widget->sizeHint().height(), 134 );
- int width = qApp->desktop()->width() * (inputWidgetWidth*0.01);
+ int width = static_cast<int>( qApp->desktop()->width() * (inputWidgetWidth*0.01) );
int left = 0;
@@ -610,3 +606,3 @@ void InputMethods::sendKey( ushort unicode, ushort scancode, ushort mod, bool pr
-bool InputMethods::eventFilter( QObject* o, QEvent* e )
+bool InputMethods::eventFilter( QObject* , QEvent* e )
{
@@ -621 +617,11 @@ bool InputMethods::eventFilter( QObject* o, QEvent* e )
}
+
+void InputMethods::readConfig() {
+ Config cfg( "Launcher" );
+ cfg.setGroup( "InputMethods" );
+
+ inputWidgetStyle = QWidget::WStyle_Customize | QWidget::WStyle_StaysOnTop | QWidget::WGroupLeader | QWidget::WStyle_Tool;
+ inputWidgetStyle |= cfg.readBoolEntry( "Float", false ) ?
+ QWidget::WStyle_DialogBorder : 0;
+ inputWidgetWidth = cfg.readNumEntry( "Width", 100 );
+}