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 3 years ago
parent
commit
283aebe001
Signed by: SlavekB GPG Key ID: 608F5293A04BE668
  1. 2
      CMakeLists.txt
  2. 26
      style/config/lipstikconf.cpp
  3. 6
      style/lipstik.cpp

2
CMakeLists.txt

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

26
style/config/lipstikconf.cpp

@ -130,7 +130,7 @@ LipstikStyleConfig::LipstikStyleConfig(TQWidget* parent): TQWidget(parent)
scrollBarStyleLabel = new TQLabel(scrollGrp);
scrollBarStyleLabel->setText(i18n("Scrollbar style : "));
scrollBarStyle = new TQComboBox(i18n("Scrollbar style"), scrollGrp);
scrollBarStyle = new TQComboBox(i18n("Scrollbar style").utf8(), scrollGrp);
scrollBarStyle->setEditable(false);
scrollBarStyle->insertItem("Windows style");
scrollBarStyle->insertItem("Platinum style");
@ -139,7 +139,7 @@ LipstikStyleConfig::LipstikStyleConfig(TQWidget* parent): TQWidget(parent)
scrollBarWidthLabel = new TQLabel(scrollGrp);
scrollBarWidthLabel->setText(i18n("Scrollbar width : "));
scrollBarWidth = new TQComboBox(i18n("Scrollbar width"), scrollGrp);
scrollBarWidth = new TQComboBox(i18n("Scrollbar width").utf8(), scrollGrp);
scrollBarWidth->setEditable(false);
scrollBarWidth->insertItem("Small");
scrollBarWidth->insertItem("Normal");
@ -147,7 +147,7 @@ LipstikStyleConfig::LipstikStyleConfig(TQWidget* parent): TQWidget(parent)
sliderStyleLabel = new TQLabel(scrollGrp);
sliderStyleLabel->setText(i18n("Slider handle size : "));
sliderStyle = new TQComboBox(i18n("Slider handle size"), scrollGrp);
sliderStyle = new TQComboBox(i18n("Slider handle size").utf8(), scrollGrp);
sliderStyle->setEditable(false);
sliderStyle->insertItem("Small");
sliderStyle->insertItem("Medium");
@ -695,13 +695,13 @@ TQString LipstikStyleConfig::scrollBarType( int listnr )
int LipstikStyleConfig::scrollBarItem( TQString kSBType )
{
if( !strcmp(kSBType,"WindowsStyleScrollBar") )
if( !strcmp(kSBType.latin1(), "WindowsStyleScrollBar") )
return 0;
else if( !strcmp(kSBType,"PlatinumStyleScrollBar") )
else if( !strcmp(kSBType.latin1(), "PlatinumStyleScrollBar") )
return 1;
else if( !strcmp(kSBType,"ThreeButtonScrollBar") )
else if( !strcmp(kSBType.latin1(), "ThreeButtonScrollBar") )
return 2;
else if( !strcmp(kSBType,"NextStyleScrollBar") )
else if( !strcmp(kSBType.latin1(), "NextStyleScrollBar") )
return 3;
else
return 1;
@ -724,11 +724,11 @@ TQString LipstikStyleConfig::scrollBarWidthType( int widthListnr )
int LipstikStyleConfig::scrollBarWidthItem( TQString kSBWidthType )
{
if( !strcmp(kSBWidthType,"Small") )
if( !strcmp(kSBWidthType.latin1(), "Small") )
return 0;
else if( !strcmp(kSBWidthType,"Normal") )
else if( !strcmp(kSBWidthType.latin1(), "Normal") )
return 1;
else if( !strcmp(kSBWidthType,"Large") )
else if( !strcmp(kSBWidthType.latin1(), "Large") )
return 2;
else
return 0;
@ -737,11 +737,11 @@ int LipstikStyleConfig::scrollBarWidthItem( TQString kSBWidthType )
//Slider types
int LipstikStyleConfig::sliderItem( TQString kSliderType )
{
if( !strcmp(kSliderType,"sliderPlastikStyle") )
if( !strcmp(kSliderType.latin1(), "sliderPlastikStyle") )
return 0;
else if( !strcmp(kSliderType,"sliderLipstikStyle") )
else if( !strcmp(kSliderType.latin1(), "sliderLipstikStyle") )
return 1;
else if( !strcmp(kSliderType,"sliderGtkStyle") )
else if( !strcmp(kSliderType.latin1(), "sliderGtkStyle") )
return 2;
else
return 2;

6
style/lipstik.cpp

@ -220,11 +220,11 @@ LipstikStyle::LipstikStyle() : TDEStyle( AllowMenuTransparency, ThreeButtonScrol
settings.endGroup();
if( !strcmp(_scrollBarStyle,"WindowsStyleScrollBar" ) )
if( !strcmp(_scrollBarStyle.latin1(), "WindowsStyleScrollBar" ) )
this->setScrollBarType(TDEStyle::WindowsStyleScrollBar);
else if( !strcmp(_scrollBarStyle,"PlatinumStyleScrollBar" ) )
else if( !strcmp(_scrollBarStyle.latin1(), "PlatinumStyleScrollBar" ) )
this->setScrollBarType(TDEStyle::PlatinumStyleScrollBar);
else if( !strcmp(_scrollBarStyle,"NextStyleScrollBar" ) )
else if( !strcmp(_scrollBarStyle.latin1(), "NextStyleScrollBar" ) )
this->setScrollBarType(TDEStyle::NextStyleScrollBar);
// setup pixmap cache...

Loading…
Cancel
Save