Browse Source

Added controlled conversions to char* instead of automatic ascii conversions.

The definition of -UTQT_NO_ASCII_CAST is no longer needed.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 2 months ago
parent
commit
283aebe001
Signed by: Slávek Banko <slavek.banko@axis.cz> GPG Key ID: 608F5293A04BE668
3 changed files with 17 additions and 17 deletions
  1. 1
    1
      CMakeLists.txt
  2. 13
    13
      style/config/lipstikconf.cpp
  3. 3
    3
      style/lipstik.cpp

+ 1
- 1
CMakeLists.txt View File

@@ -58,7 +58,7 @@ include( ConfigureChecks.cmake )
58 58
 
59 59
 ###### global compiler settings
60 60
 
61
-add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST )
61
+add_definitions( -DHAVE_CONFIG_H )
62 62
 
63 63
 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
64 64
 set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )

+ 13
- 13
style/config/lipstikconf.cpp View File

@@ -130,7 +130,7 @@ LipstikStyleConfig::LipstikStyleConfig(TQWidget* parent): TQWidget(parent)
130 130
 
131 131
         scrollBarStyleLabel = new TQLabel(scrollGrp);
132 132
         scrollBarStyleLabel->setText(i18n("Scrollbar style :       "));
133
-	scrollBarStyle = new TQComboBox(i18n("Scrollbar style"), scrollGrp);
133
+	scrollBarStyle = new TQComboBox(i18n("Scrollbar style").utf8(), scrollGrp);
134 134
 	scrollBarStyle->setEditable(false);
135 135
 	scrollBarStyle->insertItem("Windows style");
136 136
 	scrollBarStyle->insertItem("Platinum style");
@@ -139,7 +139,7 @@ LipstikStyleConfig::LipstikStyleConfig(TQWidget* parent): TQWidget(parent)
139 139
 
140 140
         scrollBarWidthLabel = new TQLabel(scrollGrp);
141 141
         scrollBarWidthLabel->setText(i18n("Scrollbar width :       "));
142
-	scrollBarWidth = new TQComboBox(i18n("Scrollbar width"), scrollGrp);
142
+	scrollBarWidth = new TQComboBox(i18n("Scrollbar width").utf8(), scrollGrp);
143 143
 	scrollBarWidth->setEditable(false);
144 144
 	scrollBarWidth->insertItem("Small");
145 145
 	scrollBarWidth->insertItem("Normal");
@@ -147,7 +147,7 @@ LipstikStyleConfig::LipstikStyleConfig(TQWidget* parent): TQWidget(parent)
147 147
 
148 148
         sliderStyleLabel = new TQLabel(scrollGrp);
149 149
         sliderStyleLabel->setText(i18n("Slider handle size :       "));
150
-	sliderStyle = new TQComboBox(i18n("Slider handle size"), scrollGrp);
150
+	sliderStyle = new TQComboBox(i18n("Slider handle size").utf8(), scrollGrp);
151 151
 	sliderStyle->setEditable(false);
152 152
 	sliderStyle->insertItem("Small");
153 153
 	sliderStyle->insertItem("Medium");
@@ -695,13 +695,13 @@ TQString LipstikStyleConfig::scrollBarType( int listnr )
695 695
 
696 696
 int LipstikStyleConfig::scrollBarItem( TQString kSBType )
697 697
 {
698
-    if( !strcmp(kSBType,"WindowsStyleScrollBar") )
698
+    if( !strcmp(kSBType.latin1(), "WindowsStyleScrollBar") )
699 699
         return 0;
700
-    else if( !strcmp(kSBType,"PlatinumStyleScrollBar") )
700
+    else if( !strcmp(kSBType.latin1(), "PlatinumStyleScrollBar") )
701 701
         return 1;
702
-    else if( !strcmp(kSBType,"ThreeButtonScrollBar") )
702
+    else if( !strcmp(kSBType.latin1(), "ThreeButtonScrollBar") )
703 703
         return 2;
704
-    else if( !strcmp(kSBType,"NextStyleScrollBar") )
704
+    else if( !strcmp(kSBType.latin1(), "NextStyleScrollBar") )
705 705
         return 3;
706 706
     else
707 707
         return 1;
@@ -724,11 +724,11 @@ TQString LipstikStyleConfig::scrollBarWidthType( int widthListnr )
724 724
 
725 725
 int LipstikStyleConfig::scrollBarWidthItem( TQString kSBWidthType )
726 726
 {
727
-    if( !strcmp(kSBWidthType,"Small") )
727
+    if( !strcmp(kSBWidthType.latin1(), "Small") )
728 728
         return 0;
729
-    else if( !strcmp(kSBWidthType,"Normal") )
729
+    else if( !strcmp(kSBWidthType.latin1(), "Normal") )
730 730
         return 1;
731
-    else if( !strcmp(kSBWidthType,"Large") )
731
+    else if( !strcmp(kSBWidthType.latin1(), "Large") )
732 732
         return 2;
733 733
     else
734 734
         return 0;
@@ -737,11 +737,11 @@ int LipstikStyleConfig::scrollBarWidthItem( TQString kSBWidthType )
737 737
 //Slider types
738 738
 int LipstikStyleConfig::sliderItem( TQString kSliderType )
739 739
 {
740
-    if( !strcmp(kSliderType,"sliderPlastikStyle") )
740
+    if( !strcmp(kSliderType.latin1(), "sliderPlastikStyle") )
741 741
         return 0;
742
-    else if( !strcmp(kSliderType,"sliderLipstikStyle") )
742
+    else if( !strcmp(kSliderType.latin1(), "sliderLipstikStyle") )
743 743
         return 1;
744
-    else if( !strcmp(kSliderType,"sliderGtkStyle") )
744
+    else if( !strcmp(kSliderType.latin1(), "sliderGtkStyle") )
745 745
         return 2;
746 746
     else
747 747
         return 2;

+ 3
- 3
style/lipstik.cpp View File

@@ -220,11 +220,11 @@ LipstikStyle::LipstikStyle() : TDEStyle( AllowMenuTransparency, ThreeButtonScrol
220 220
 
221 221
     settings.endGroup();
222 222
 
223
-    if( !strcmp(_scrollBarStyle,"WindowsStyleScrollBar" ) )
223
+    if( !strcmp(_scrollBarStyle.latin1(), "WindowsStyleScrollBar" ) )
224 224
         this->setScrollBarType(TDEStyle::WindowsStyleScrollBar);
225
-    else if( !strcmp(_scrollBarStyle,"PlatinumStyleScrollBar" ) )
225
+    else if( !strcmp(_scrollBarStyle.latin1(), "PlatinumStyleScrollBar" ) )
226 226
         this->setScrollBarType(TDEStyle::PlatinumStyleScrollBar);
227
-    else if( !strcmp(_scrollBarStyle,"NextStyleScrollBar" ) )
227
+    else if( !strcmp(_scrollBarStyle.latin1(), "NextStyleScrollBar" ) )
228 228
         this->setScrollBarType(TDEStyle::NextStyleScrollBar);
229 229
 
230 230
     // setup pixmap cache...

Loading…
Cancel
Save