tab-size in QEditor

Milo Hoffman Milo at NG-Projekt.ORG
Mon Jan 13 05:34:04 UTC 2003


> This is due to the order of calling setFont and setTabStopWidth in
> QEditor::updateStyles(). Moving the setFont call below the two
> setTabStopWidth calls, removes this bug.

the setFont call must be before the other twos, of course. hm, it's later than i thought :-|

Milo

/usr/src/kde # diff -u3 kdevelop/parts/qeditor/qeditor.cpp qeditor.cpp
--- kdevelop/parts/qeditor/qeditor.cpp  2002-12-22 03:11:09.000000000 +0100
+++ qeditor.cpp 2003-01-13 05:31:28.000000000 +0100
@@ -303,9 +303,9 @@
     int tabwidth = tabStop();
     QSourceColorizer* colorizer = dynamic_cast<QSourceColorizer*>( document()->preProcessor() );
     if( colorizer ){
+       setFont( colorizer->format( 0 )->font() );
        setTabStopWidth( colorizer->format(0)->width('x') * tabwidth );
        document()->setTabStops( colorizer->format(0)->width('x') * tabwidth );
-       setFont( colorizer->format( 0 )->font() );
     }
     KTextEdit::updateStyles();
 }




More information about the KDevelop-devel mailing list