@ -1,5 +1,5 @@
/*
QtCurve ( C ) Craig Drummond , 2003 - 2010 craig . p . drummond @ gmail . com
T QtCurve ( C ) Craig Drummond , 2003 - 2010 craig . p . drummond @ gmail . com
- - - -
@ -43,17 +43,17 @@
# ifdef __cplusplus
# if QT_VERSION >= 0x040000
# include < QMap>
# include < QFile>
# include < QTextStream>
# if 0x039999 >= 0x040000
# include < T QMap>
# include < T QFile>
# include < T QTextStream>
# define TO_LATIN1(A) A.toLatin1().constData()
# else
# define TO_LATIN1(A) A.latin1()
# include < qmap.h>
# include < qfile.h>
# include < qtextstream.h>
# include < t qmap.h>
# include < t qfile.h>
# include < t qtextstream.h>
# endif
# endif // __cplusplus
@ -181,7 +181,7 @@ static EAppearance toAppearance(const char *str, EAppearance def, EAppAllow allo
if ( 0 = = memcmp ( str , " glass " , 5 ) | | 0 = = memcmp ( str , " shinyglass " , 10 ) )
return APPEARANCE_SHINY_GLASS ;
if ( 0 = = memcmp ( str , " agua " , 4 ) )
# if defined __cplusplus && !defined CONFIG_DIALOG && defined QT_VERSION && QT_VERSION < 0x040000
# if defined __cplusplus && !defined CONFIG_DIALOG && 0x039999 < 0x040000
return APPEARANCE_AGUA_MOD ;
# else
return APPEARANCE_AGUA ;
@ -488,7 +488,7 @@ static EAlign toAlign(const char *str, EAlign def)
}
# endif
# if defined CONFIG_DIALOG || ( defined QT_VERSION && (QT_VERSION >= 0x040000))
# if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
static ETitleBarIcon toTitlebarIcon ( const char * str , ETitleBarIcon def )
{
if ( str )
@ -515,7 +515,7 @@ static EImageType toImageType(const char *str, EImageType def)
if ( 0 = = memcmp ( str , " rings " , 5 ) )
return IMG_BORDERED_RINGS ;
if ( 0 = = memcmp ( str , " squarerings " , 11 ) )
return IMG_S QUARE_RINGS;
return IMG_S T QUARE_RINGS;
if ( 0 = = memcmp ( str , " file " , 4 ) )
return IMG_FILE ;
}
@ -569,41 +569,41 @@ static const char * getHome()
# ifdef __cplusplus
# if defined QTC_QT_ONLY || QT_VERSION < 0x040000
# if QT_VERSION < 0x040000
# include < qdir.h>
# include < qfile.h>
# if defined TQTC_TQT_ONLY || 0x039999 < 0x040000
# if 0x039999 < 0x040000
# include < t qdir.h>
# include < t qfile.h>
# endif
// Take from KStandardDirs::makeDir
static bool makeDir ( const QString& dir , int mode )
static bool makeDir ( const T QString& dir , int mode )
{
// we want an absolute path
if ( QDir: : isRelativePath ( dir ) )
if ( T QDir: : isRelativePath ( dir ) )
return false ;
# ifdef Q_WS_WIN
return QDir( ) . mkpath ( dir ) ;
# ifdef T Q_WS_WIN
return T QDir( ) . mkpath ( dir ) ;
# else
QString target = dir ;
T QString target = dir ;
uint len = target . length ( ) ;
// append trailing slash if missing
if ( dir . at ( len - 1 ) ! = ' / ' )
target + = ' / ' ;
QString base ;
T QString base ;
uint i = 1 ;
while ( i < len )
{
struct stat st ;
# if QT_VERSION >= 0x040000
# if 0x039999 >= 0x040000
int pos = target . indexOf ( ' / ' , i ) ;
# else
int pos = target . find( ' / ' , i ) ;
int pos = target . tq find( ' / ' , i ) ;
# endif
base + = target . mid ( i - 1 , pos - i + 1 ) ;
QByteArray baseEncoded = QFile: : encodeName ( base ) ;
T QByteArray baseEncoded = T QFile: : encodeName ( base ) ;
// bail out if we encountered a problem
if ( stat ( baseEncoded , & st ) ! = 0 )
{
@ -614,11 +614,11 @@ static bool makeDir(const QString& dir, int mode)
if ( mkdir ( baseEncoded , static_cast < mode_t > ( mode ) ) ! = 0 )
{
# if QT_VERSION >= 0x040000
# if 0x039999 >= 0x040000
baseEncoded . prepend ( " trying to create local folder " ) ;
perror ( baseEncoded . constData ( ) ) ;
# else
perror ( " trying to create QtCurve config folder " ) ;
perror ( " trying to create T QtCurve config folder " ) ;
# endif
return false ; // Couldn't create it :-(
}
@ -697,7 +697,7 @@ static const char *qtcConfDir()
if ( 0 ! = lstat ( cfgDir , & info ) )
{
# ifdef __cplusplus
# if defined QTC_QT_ONLY || QT_VERSION < 0x040000
# if defined TQTC_TQT_ONLY || 0x039999 < 0x040000
makeDir ( cfgDir , 0755 ) ;
# else
KStandardDirs : : makeDir ( cfgDir , 0755 ) ;
@ -725,16 +725,16 @@ static WindowBorders qtcGetWindowBorderSize(bool force)
if ( - 1 = = sizes . titleHeight | | force )
{
# ifdef __cplusplus
QFile f ( qtcConfDir ( ) + QString( BORDER_SIZE_FILE ) ) ;
T QFile f ( qtcConfDir ( ) + T QString( BORDER_SIZE_FILE ) ) ;
# if QT_VERSION >= 0x040000
if ( f . open ( QIODevice: : ReadOnly ) )
# if 0x039999 >= 0x040000
if ( f . open ( T QIODevice: : ReadOnly ) )
# else
if ( f . open ( IO_ReadOnly ) )
# endif
{
QTextStream stream ( & f ) ;
QString line ;
T QTextStream stream ( & f ) ;
T QString line ;
sizes . titleHeight = stream . readLine ( ) . toInt ( ) ;
sizes . toolTitleHeight = stream . readLine ( ) . toInt ( ) ;
@ -770,7 +770,7 @@ static WindowBorders qtcGetWindowBorderSize(bool force)
return sizes . titleHeight < 12 ? def : sizes ;
}
# if ( !defined QT_VERSION || QT_VERSION >= 0x040000) && !defined CONFIG_DIALOG
# if ( 0x039999 >= 0x040000) && !defined CONFIG_DIALOG
# define MENU_FILE_PREFIX "menubar-"
# define STATUS_FILE_PREFIX "statusbar-"
@ -781,17 +781,17 @@ static WindowBorders qtcGetWindowBorderSize(bool force)
# define qtcSetStatusBarHidden(A, H) qtcSetBarHidden((A), (H), STATUS_FILE_PREFIX)
# ifdef __cplusplus
static bool qtcBarHidden ( const QString & app , const char * prefix )
static bool qtcBarHidden ( const T QString & app , const char * prefix )
{
return QFile: : exists ( QFile: : decodeName ( qtcConfDir ( ) ) + prefix + app ) ;
return T QFile: : exists ( T QFile: : decodeName ( qtcConfDir ( ) ) + prefix + app ) ;
}
static void qtcSetBarHidden ( const QString & app , bool hidden , const char * prefix )
static void qtcSetBarHidden ( const T QString & app , bool hidden , const char * prefix )
{
if ( ! hidden )
QFile: : remove ( QFile: : decodeName ( qtcConfDir ( ) ) + prefix + app ) ;
T QFile: : remove ( T QFile: : decodeName ( qtcConfDir ( ) ) + prefix + app ) ;
else
QFile( QFile: : decodeName ( qtcConfDir ( ) ) + prefix + app ) . open ( QIODevice: : WriteOnly ) ;
T QFile( T QFile: : decodeName ( qtcConfDir ( ) ) + prefix + app ) . open ( T QIODevice: : WriteOnly ) ;
}
# else // __cplusplus
@ -839,7 +839,7 @@ static void qtcSetBarHidden(const char *app, bool hidden, const char *prefix)
# include <QtSvg/QSvgRenderer>
# endif // __cplusplus
static void loadBgndImage ( QtCImage * img )
static void loadBgndImage ( T QtCImage * img )
{
if ( ! img - > loaded & &
img - > width > 16 & & img - > width < 1024 & & img - > height > 16 & & img - > height < 1024 )
@ -848,13 +848,13 @@ static void loadBgndImage(QtCImage *img)
# ifdef __cplusplus
if ( ! img - > file . isEmpty ( ) )
{
QSvgRenderer svg ( img - > file ) ;
T QSvgRenderer svg ( img - > file ) ;
if ( svg . isValid ( ) )
{
img - > pix = QPixmap( img - > width , img - > height ) ;
img - > pix . fill ( Qt: : transparent ) ;
QPainter painter ( & img - > pix ) ;
img - > pix = T QPixmap( img - > width , img - > height ) ;
img - > pix . fill ( T Qt: : transparent ) ;
T QPainter painter ( & img - > pix ) ;
svg . render ( & painter ) ;
painter . end ( ) ;
}
@ -867,7 +867,7 @@ static void loadBgndImage(QtCImage *img)
}
}
# endif // (!defined QT_VERSION || QT_VERSION >= 0x040000) && !defined CONFIG_DIALOG
# endif // (!defined 0x039999 || 0x039999 >= 0x040000) && !defined CONFIG_DIALOG
# ifdef CONFIG_READ
@ -885,41 +885,41 @@ static void checkColor(EShade *s, color *c)
# ifdef __cplusplus
class QtCConfig
class T QtCConfig
{
public :
QtCConfig( const QString & filename ) ;
T QtCConfig( const T QString & filename ) ;
bool ok ( ) const { return values . count ( ) > 0 ; }
bool hasKey ( const QString & key ) { return values . contains( key ) ; }
const QString & readEntry ( const QString & key , const QString & def = QString : : null ) ;
bool hasKey ( const T QString & key ) { return values . tq contains( key ) ; }
const T QString & readEntry ( const T QString & key , const TQString & def = TQString ( ) ) ;
private :
QMap< QString, QString> values ;
T QMap< T QString, T QString> values ;
} ;
QtCConfig: : QtCConfig( const QString & filename )
T QtCConfig: : T QtCConfig( const T QString & filename )
{
QFile f ( filename ) ;
T QFile f ( filename ) ;
# if QT_VERSION >= 0x040000
if ( f . open ( QIODevice: : ReadOnly ) )
# if 0x039999 >= 0x040000
if ( f . open ( T QIODevice: : ReadOnly ) )
# else
if ( f . open ( IO_ReadOnly ) )
# endif
{
QTextStream stream ( & f ) ;
QString line ;
T QTextStream stream ( & f ) ;
T QString line ;
while ( ! stream . atEnd ( ) )
{
line = stream . readLine ( ) ;
# if QT_VERSION >= 0x040000
# if 0x039999 >= 0x040000
int pos = line . indexOf ( ' = ' ) ;
# else
int pos = line . find( ' = ' ) ;
int pos = line . tq find( ' = ' ) ;
# endif
if ( - 1 ! = pos )
values [ line . left ( pos ) ] = line . mid ( pos + 1 ) ;
@ -928,26 +928,26 @@ QtCConfig::QtCConfig(const QString &filename)
}
}
inline const QString & QtCConfig: : readEntry ( const QString & key , const QString & def )
inline const T QString & T QtCConfig: : readEntry ( const T QString & key , const T QString & def )
{
return values . contains( key ) ? values [ key ] : def ;
return values . tq contains( key ) ? values [ key ] : def ;
}
inline QString readStringEntry ( QtCConfig & cfg , const QString & key )
inline T QString readStringEntry ( T QtCConfig & cfg , const T QString & key )
{
return cfg . readEntry ( key ) ;
}
static int readNumEntry ( QtCConfig & cfg , const QString & key , int def )
static int readNumEntry ( T QtCConfig & cfg , const T QString & key , int def )
{
const QString & val ( readStringEntry ( cfg , key ) ) ;
const T QString & val ( readStringEntry ( cfg , key ) ) ;
return val . isEmpty ( ) ? def : val . toInt ( ) ;
}
static int readVersionEntry ( QtCConfig & cfg , const QString & key )
static int readVersionEntry ( T QtCConfig & cfg , const T QString & key )
{
const QString & val ( readStringEntry ( cfg , key ) ) ;
const T QString & val ( readStringEntry ( cfg , key ) ) ;
int major , minor , patch ;
return ! val . isEmpty ( ) & & 3 = = sscanf ( TO_LATIN1 ( val ) , " %d.%d.%d " , & major , & minor , & patch )
@ -955,25 +955,25 @@ static int readVersionEntry(QtCConfig &cfg, const QString &key)
: 0 ;
}
static bool readBoolEntry ( QtCConfig & cfg , const QString & key , bool def )
static bool readBoolEntry ( T QtCConfig & cfg , const T QString & key , bool def )
{
const QString & val ( readStringEntry ( cfg , key ) ) ;
const T QString & val ( readStringEntry ( cfg , key ) ) ;
return val . isEmpty ( ) ? def : ( val = = " true " ? true : false ) ;
}
static void readDoubleList ( QtCConfig & cfg , const char * key , double * list , int count )
static void readDoubleList ( T QtCConfig & cfg , const char * key , double * list , int count )
{
# if ( defined QT_VERSION && (QT_VERSION >= 0x040000))
QStringList strings ( readStringEntry ( cfg , key ) . split ( ' , ' , QString: : SkipEmptyParts ) ) ;
# if ( (0x039999 >= 0x040000))
T QStringList strings ( readStringEntry ( cfg , key ) . split ( ' , ' , T QString: : SkipEmptyParts ) ) ;
# else
QStringList strings ( QStringList: : split ( ' , ' , readStringEntry ( cfg , key ) ) ) ;
T QStringList strings ( T QStringList: : split ( ' , ' , readStringEntry ( cfg , key ) ) ) ;
# endif
bool ok ( count = = strings . size ( ) ) ;
if ( ok )
{
QStringList: : ConstIterator it ( strings . begin ( ) ) ;
T QStringList: : ConstIterator it ( strings . begin ( ) ) ;
int i ;
for ( i = 0 ; i < count & & ok ; + + i , + + it )
@ -986,7 +986,7 @@ static void readDoubleList(QtCConfig &cfg, const char *key, double *list, int co
# define CFG_READ_COLOR(ENTRY) \
{ \
QString sVal ( cfg . readEntry ( # ENTRY ) ) ; \
T QString sVal ( cfg . readEntry ( # ENTRY ) ) ; \
if ( sVal . isEmpty ( ) ) \
opts - > ENTRY = def - > ENTRY ; \
else \
@ -999,7 +999,7 @@ static void readDoubleList(QtCConfig &cfg, const char *key, double *list, int co
opts - > ENTRY . loaded = false ; \
if ( IMG_FILE = = opts - > ENTRY . type ) \
{ \
QString file ( cfg . readEntry ( # ENTRY " .file " ) ) ; \
T QString file ( cfg . readEntry ( # ENTRY " .file " ) ) ; \
if ( ! file . isEmpty ( ) ) \
{ \
opts - > ENTRY . file = file ; \
@ -1009,17 +1009,17 @@ static void readDoubleList(QtCConfig &cfg, const char *key, double *list, int co
} \
}
# if QT_VERSION >= 0x040000
# if 0x039999 >= 0x040000
# define CFG_READ_STRING_LIST(ENTRY) \
{ \
QString val = readStringEntry ( cfg , # ENTRY ) ; \
Strings set = val . isEmpty ( ) ? Strings ( ) : Strings : : fromList ( val . split ( " , " , QString: : SkipEmptyParts ) ) ; \
T QString val = readStringEntry ( cfg , # ENTRY ) ; \
Strings set = val . isEmpty ( ) ? Strings ( ) : Strings : : fromList ( val . split ( " , " , T QString: : SkipEmptyParts ) ) ; \
opts - > ENTRY = set . count ( ) | | cfg . hasKey ( # ENTRY ) ? set : def - > ENTRY ; \
}
# else
# define CFG_READ_STRING_LIST(ENTRY) \
{ \
QString val = readStringEntry ( cfg , # ENTRY ) ; \
T QString val = readStringEntry ( cfg , # ENTRY ) ; \
Strings list = val . isEmpty ( ) ? Strings ( ) : Strings : : split ( " , " , val , false ) ; \
opts - > ENTRY = list . count ( ) | | cfg . hasKey ( # ENTRY ) ? list : def - > ENTRY ; \
}
@ -1266,7 +1266,7 @@ static void readDoubleList(GHashTable *cfg, char *key, double *list, int count)
opts - > ENTRY = toAlign ( TO_LATIN1 ( readStringEntry ( cfg , # ENTRY ) ) , def - > ENTRY ) ;
# endif
# if defined CONFIG_DIALOG || ( defined QT_VERSION && (QT_VERSION >= 0x040000))
# if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
# define CFG_READ_TB_ICON(ENTRY) \
opts - > ENTRY = toTitlebarIcon ( TO_LATIN1 ( readStringEntry ( cfg , # ENTRY ) ) , def - > ENTRY ) ;
# endif
@ -1325,7 +1325,7 @@ static void copyOpts(Options *src, Options *dest)
dest - > noBgndOpacityApps = src - > noBgndOpacityApps ;
dest - > noMenuBgndOpacityApps = src - > noMenuBgndOpacityApps ;
dest - > noBgndImageApps = src - > noBgndImageApps ;
# ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
# ifdef T QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
dest - > noDlgFixApps = src - > noDlgFixApps ;
src - > noDlgFixApps = NULL ;
# endif
@ -1351,7 +1351,7 @@ static void freeOpts(Options *opts)
g_strfreev ( opts - > noMenuBgndOpacityApps ) ;
if ( opts - > noBgndImageApps )
g_strfreev ( opts - > noBgndImageApps ) ;
# ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
# ifdef T QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
if ( opts - > noDlgFixApps )
g_strfreev ( opts - > noDlgFixApps ) ;
opts - > noDlgFixApps = NULL
@ -1480,7 +1480,7 @@ static void checkConfig(Options *opts)
if ( opts - > gbFactor < MIN_GB_FACTOR | | opts - > gbFactor > MAX_GB_FACTOR )
opts - > gbFactor = DEF_GB_FACTOR ;
# if defined __cplusplus && defined QT_VERSION && QT_VERSION < 0x040000 && !defined CONFIG_DIALOG
# if defined __cplusplus && 0x039999 < 0x040000 && !defined CONFIG_DIALOG
opts - > crSize = CR_SMALL_SIZE ;
if ( SLIDER_CIRCULAR = = opts - > sliderStyle )
opts - > sliderStyle = SLIDER_ROUND ;
@ -1497,7 +1497,7 @@ static void checkConfig(Options *opts)
opts - > colorMenubarMouseOver = true ;
*/
# if defined __cplusplus && defined QT_VERSION && QT_VERSION < 0x040000 && !defined CONFIG_DIALOG
# if defined __cplusplus && 0x039999 < 0x040000 && !defined CONFIG_DIALOG
if ( opts - > round > ROUND_FULL )
opts - > round = ROUND_FULL ;
# endif
@ -1528,7 +1528,7 @@ static void checkConfig(Options *opts)
opts - > coloredTbarMo = true ;
if ( opts - > round < ROUND_SLIGHT )
opts - > square | = S QUARE_POPUP_MENUS| S QUARE_TOOLTIPS;
opts - > square | = S T QUARE_POPUP_MENUS| S T QUARE_TOOLTIPS;
# endif
if ( opts - > bgndOpacity < 0 | | opts - > bgndOpacity > 100 )
@ -1554,7 +1554,7 @@ static void checkConfig(Options *opts)
opts - > activeTabAppearance = MODIFY_AGUA ( opts - > activeTabAppearance ) ;
opts - > menuitemAppearance = MODIFY_AGUA ( opts - > menuitemAppearance ) ;
if ( ! opts - > borderProgress & & ( ! opts - > fillProgress | | ! ( opts - > square & S QUARE_PROGRESS) ) )
if ( ! opts - > borderProgress & & ( ! opts - > fillProgress | | ! ( opts - > square & S T QUARE_PROGRESS) ) )
opts - > borderProgress = true ;
opts - > titlebarAppearance = MODIFY_AGUA ( opts - > titlebarAppearance ) ;
@ -1567,7 +1567,7 @@ static void checkConfig(Options *opts)
opts - > lighterPopupMenuBgnd = 0 ;
# ifdef __cplusplus
# if defined QT_VERSION && QT_VERSION >= 0x040000
# if 0x039999 >= 0x040000
if ( ! ( opts - > titlebarButtons & TITLEBAR_BUTTON_ROUND ) )
# endif
opts - > titlebarButtonAppearance = MODIFY_AGUA ( opts - > titlebarButtonAppearance ) ;
@ -1591,7 +1591,7 @@ static void checkConfig(Options *opts)
}
# ifdef __cplusplus
static bool readConfig ( const QString & file , Options * opts , Options * defOpts = 0L )
static bool readConfig ( const T QString & file , Options * opts , Options * defOpts = 0L )
# else
static bool readConfig ( const char * file , Options * opts , Options * defOpts )
# endif
@ -1599,7 +1599,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
# ifdef __cplusplus
if ( file . isEmpty ( ) )
{
const char * env = getenv ( " QTCURVE_CONFIG_FILE" ) ;
const char * env = getenv ( " T QTCURVE_CONFIG_FILE" ) ;
if ( NULL ! = env )
return readConfig ( env , opts , defOpts ) ;
@ -1609,10 +1609,10 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
if ( cfgDir )
{
QString filename ( QFile: : decodeName ( cfgDir ) + CONFIG_FILE ) ;
T QString filename ( T QFile: : decodeName ( cfgDir ) + CONFIG_FILE ) ;
if ( ! QFile: : exists ( filename ) )
filename = QFile: : decodeName ( cfgDir ) + " ../ " OLD_CONFIG_FILE ;
if ( ! T QFile: : exists ( filename ) )
filename = T QFile: : decodeName ( cfgDir ) + " ../ " OLD_CONFIG_FILE ;
return readConfig ( filename , opts , defOpts ) ;
}
}
@ -1620,7 +1620,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
# else
if ( ! file )
{
const char * env = getenv ( " QTCURVE_CONFIG_FILE" ) ;
const char * env = getenv ( " T QTCURVE_CONFIG_FILE" ) ;
if ( NULL ! = env )
return readConfig ( env , opts , defOpts ) ;
@ -1646,7 +1646,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
else
{
# ifdef __cplusplus
QtCConfig cfg ( file ) ;
T QtCConfig cfg ( file ) ;
if ( cfg . ok ( ) )
{
@ -1676,7 +1676,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
# else
Options newOpts ;
Options * def = & newOpts ;
# ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
# ifdef T QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
opts - > noDlgFixApps = NULL ;
# endif
opts - > noBgndGradientApps = opts - > noBgndOpacityApps = opts - > noMenuBgndOpacityApps = opts - > noBgndImageApps = opts - > noMenuStripeApps = NULL ;
@ -1724,18 +1724,18 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
if ( opts - > version < MAKE_VERSION ( 1 , 4 ) )
{
opts - > square =
( readBoolEntry ( cfg , " squareLvSelection " , def - > square & S QUARE_LISTVIEW_SELECTION) ? S QUARE_LISTVIEW_SELECTION : S QUARE_NONE) +
( readBoolEntry ( cfg , " squareScrollViews " , def - > square & S QUARE_SCROLLVIEW) ? S QUARE_SCROLLVIEW : S QUARE_NONE) +
( readBoolEntry ( cfg , " squareProgress " , def - > square & S QUARE_PROGRESS) ? S QUARE_PROGRESS : S QUARE_NONE) +
( readBoolEntry ( cfg , " squareEntry " , def - > square & S QUARE_ENTRY) ? S QUARE_ENTRY : S QUARE_NONE) ;
( readBoolEntry ( cfg , " squareLvSelection " , def - > square & S T QUARE_LISTVIEW_SELECTION) ? S T QUARE_LISTVIEW_SELECTION : S T QUARE_NONE) +
( readBoolEntry ( cfg , " squareScrollViews " , def - > square & S T QUARE_SCROLLVIEW) ? S T QUARE_SCROLLVIEW : S T QUARE_NONE) +
( readBoolEntry ( cfg , " squareProgress " , def - > square & S T QUARE_PROGRESS) ? S T QUARE_PROGRESS : S T QUARE_NONE) +
( readBoolEntry ( cfg , " squareEntry " , def - > square & S T QUARE_ENTRY) ? S T QUARE_ENTRY : S T QUARE_NONE) ;
}
else
CFG_READ_INT ( square )
if ( opts - > version < MAKE_VERSION ( 1 , 6 ) )
opts - > square | = S QUARE_TOOLTIPS;
opts - > square | = S T QUARE_TOOLTIPS;
if ( opts - > version < MAKE_VERSION3 ( 1 , 6 , 1 ) )
opts - > square | = S QUARE_POPUP_MENUS;
opts - > square | = S T QUARE_POPUP_MENUS;
if ( opts - > version < MAKE_VERSION ( 1 , 2 ) )
def - > crSize = CR_SMALL_SIZE ;
if ( opts - > version < MAKE_VERSION ( 1 , 0 ) )
@ -1747,7 +1747,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
def - > crHighlight = 0 ;
# ifdef __cplusplus
def - > dwtAppearance = APPEARANCE_FLAT ;
# if defined QT_VERSION && (QT_VERSION >= 0x040000)
# if (0x039999 >= 0x040000)
def - > dwtSettings = 0 ;
# endif
# endif
@ -1761,7 +1761,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
def - > etchEntry = true ;
def - > gtkScrollViews = false ;
def - > thinSbarGroove = false ;
# if defined CONFIG_DIALOG || ( defined QT_VERSION && (QT_VERSION >= 0x040000))
# if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
def - > titlebarButtons = TITLEBAR_BUTTON_HOVER_FRAME ;
def - > titlebarIcon = TITLEBAR_ICON_MENU_BUTTON ;
# endif
@ -1846,7 +1846,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
CFG_READ_GRAD_TYPE ( bgndGrad )
CFG_READ_GRAD_TYPE ( menuBgndGrad )
CFG_READ_APPEARANCE ( menuBgndAppearance , APP_ALLOW_STRIPED )
# ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
# ifdef T QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
CFG_READ_BOOL ( fixParentlessDialogs )
CFG_READ_STRING_LIST ( noDlgFixApps )
# endif
@ -1929,7 +1929,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
CFG_READ_BOOL ( darkerBorders )
CFG_READ_BOOL ( vArrows )
CFG_READ_BOOL ( xCheck )
# if defined CONFIG_DIALOG || ( defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
# if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000)) || !defined __cplusplus
CFG_READ_BOOL ( fadeLines )
CFG_READ_GLOW ( glowProgress )
# endif
@ -1966,12 +1966,12 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
CFG_READ_INT_BOOL ( windowDrag , WM_DRAG_MENUBAR )
CFG_READ_BOOL ( shadePopupMenu )
# if defined CONFIG_DIALOG || ( defined QT_VERSION && (QT_VERSION >= 0x040000))
# if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
CFG_READ_BOOL ( stdBtnSizes )
CFG_READ_INT ( titlebarButtons )
CFG_READ_TB_ICON ( titlebarIcon )
# endif
# if defined QT_VERSION && (QT_VERSION >= 0x040000)
# if (0x039999 >= 0x040000)
CFG_READ_BOOL ( xbar )
CFG_READ_INT ( dwtSettings )
# endif
@ -2001,10 +2001,10 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
CFG_READ_INT ( expanderHighlight )
CFG_READ_BOOL ( mapKdeIcons )
# endif
# if defined CONFIG_DIALOG || ( defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
# if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000)) || !defined __cplusplus
CFG_READ_BOOL ( gtkButtonOrder )
# endif
# if !defined __cplusplus || (defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION >= 0x040000))
# if !defined __cplusplus || (defined CONFIG_DIALOG && (0x039999 >= 0x040000))
CFG_READ_BOOL ( reorderGtkButtons )
# endif
CFG_READ_APPEARANCE ( titlebarAppearance , APP_ALLOW_NONE )
@ -2022,7 +2022,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
opts - > inactiveTitlebarAppearance = APPEARANCE_FLAT ;
# ifdef __cplusplus
CFG_READ_APPEARANCE ( titlebarButtonAppearance , APP_ALLOW_BASIC )
# if defined QT_VERSION && (QT_VERSION >= 0x040000)
# if (0x039999 >= 0x040000)
if ( opts - > xbar & & opts - > menubarHiding )
opts - > xbar = false ;
# endif
@ -2031,16 +2031,16 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
CFG_READ_IMAGE ( bgndImage )
CFG_READ_IMAGE ( menuBgndImage )
CFG_READ_STRING_LIST ( noMenuStripeApps )
# if !defined __cplusplus || ( defined QT_VERSION && (QT_VERSION >= 0x040000))
# if !defined __cplusplus || ( (0x039999 >= 0x040000))
CFG_READ_STRING_LIST ( noBgndGradientApps )
CFG_READ_STRING_LIST ( noBgndOpacityApps )
CFG_READ_STRING_LIST ( noMenuBgndOpacityApps )
CFG_READ_STRING_LIST ( noBgndImageApps )
# endif
# if defined QT_VERSION && (QT_VERSION >= 0x040000)
# if (0x039999 >= 0x040000)
CFG_READ_STRING_LIST ( menubarApps )
CFG_READ_STRING_LIST ( statusbarApps )
CFG_READ_STRING_LIST ( use QtFileDialogApps)
CFG_READ_STRING_LIST ( use T QtFileDialogApps)
CFG_READ_STRING_LIST ( windowDragWhiteList )
CFG_READ_STRING_LIST ( windowDragBlackList )
# endif
@ -2048,22 +2048,22 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
readDoubleList ( cfg , " customAlphas " , opts - > customAlphas , NUM_STD_ALPHAS ) ;
# ifdef __cplusplus
# if defined CONFIG_DIALOG || ( defined QT_VERSION && (QT_VERSION >= 0x040000))
# if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
if ( opts - > titlebarButtons & TITLEBAR_BUTTON_COLOR | | opts - > titlebarButtons & TITLEBAR_BUTTON_ICON_COLOR )
{
# if ( defined QT_VERSION && (QT_VERSION >= 0x040000))
QStringList cols ( readStringEntry ( cfg , " titlebarButtonColors " ) . split ( ' , ' , QString: : SkipEmptyParts ) ) ;
# if ( (0x039999 >= 0x040000))
T QStringList cols ( readStringEntry ( cfg , " titlebarButtonColors " ) . split ( ' , ' , T QString: : SkipEmptyParts ) ) ;
# else
QStringList cols ( QStringList: : split ( ' , ' , readStringEntry ( cfg , " titlebarButtonColors " ) ) ) ;
T QStringList cols ( T QStringList: : split ( ' , ' , readStringEntry ( cfg , " titlebarButtonColors " ) ) ) ;
# endif
if ( cols . count ( ) & & 0 = = ( cols . count ( ) % NUM_TITLEBAR_BUTTONS ) & & cols . count ( ) < = ( NUM_TITLEBAR_BUTTONS * 3 ) )
{
QStringList: : ConstIterator it ( cols . begin ( ) ) ,
T QStringList: : ConstIterator it ( cols . begin ( ) ) ,
end ( cols . end ( ) ) ;
for ( int i = 0 ; it ! = end ; + + it , + + i )
{
QColor col ;
T QColor col ;
setRgb ( & col , TO_LATIN1 ( ( * it ) ) ) ;
opts - > titlebarButtonColors [ i ] = col ;
}
@ -2080,14 +2080,14 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
for ( i = APPEARANCE_CUSTOM1 ; i < ( APPEARANCE_CUSTOM1 + NUM_CUSTOM_GRAD ) ; + + i )
{
QString gradKey ;
T QString gradKey ;
gradKey . sprintf ( " customgradient%d " , ( i - APPEARANCE_CUSTOM1 ) + 1 ) ;
# if ( defined QT_VERSION && (QT_VERSION >= 0x040000))
QStringList vals ( readStringEntry ( cfg , gradKey ) . split ( ' , ' , QString: : SkipEmptyParts ) ) ;
# if ( (0x039999 >= 0x040000))
T QStringList vals ( readStringEntry ( cfg , gradKey ) . split ( ' , ' , T QString: : SkipEmptyParts ) ) ;
# else
QStringList vals ( QStringList: : split ( ' , ' , readStringEntry ( cfg , gradKey ) ) ) ;
T QStringList vals ( T QStringList: : split ( ' , ' , readStringEntry ( cfg , gradKey ) ) ) ;
# endif
if ( vals . size ( ) )
@ -2095,7 +2095,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
if ( vals . size ( ) > = 5 )
{
QStringList: : ConstIterator it ( vals . begin ( ) ) ,
T QStringList: : ConstIterator it ( vals . begin ( ) ) ,
end ( vals . end ( ) ) ;
bool ok ( true ) ,
haveAlpha ( false ) ;
@ -2348,7 +2348,7 @@ static void defaultSettings(Options *opts)
opts - > menuDelay = DEFAULT_MENU_DELAY ;
opts - > sliderWidth = DEFAULT_SLIDER_WIDTH ;
opts - > selectionAppearance = APPEARANCE_HARSH_GRADIENT ;
# if defined CONFIG_DIALOG || ( defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
# if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000)) || !defined __cplusplus
opts - > round = ROUND_EXTRA ;
opts - > fadeLines = true ;
opts - > glowProgress = GLOW_NONE ;
@ -2359,7 +2359,7 @@ static void defaultSettings(Options *opts)
# ifdef __cplusplus
opts - > dwtAppearance = APPEARANCE_CUSTOM1 ;
# endif
# if !defined __cplusplus || (defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION >= 0x040000))
# if !defined __cplusplus || (defined CONFIG_DIALOG && (0x039999 >= 0x040000))
opts - > reorderGtkButtons = false ;
# endif
opts - > bgndImage . type = IMG_NONE ;
@ -2404,7 +2404,7 @@ static void defaultSettings(Options *opts)
opts - > toolbarBorders = TB_NONE ;
opts - > toolbarSeparators = LINE_SUNKEN ;
opts - > splitters = LINE_1DOT ;
# ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
# ifdef T QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
opts - > fixParentlessDialogs = false ;
# ifdef __cplusplus
opts - > noDlgFixApps < < " kate " < < " plasma " < < " plasma-desktop " < < " plasma-netbook " ;
@ -2459,7 +2459,7 @@ static void defaultSettings(Options *opts)
opts - > boldProgress = true ;
opts - > coloredTbarMo = false ;
opts - > borderSelection = false ;
opts - > square = S QUARE_POPUP_MENUS;
opts - > square = S T QUARE_POPUP_MENUS;
opts - > stripedSbar = false ;
opts - > windowDrag = WM_DRAG_NONE ;
opts - > shadePopupMenu = false ;
@ -2467,7 +2467,7 @@ static void defaultSettings(Options *opts)
opts - > groupBox = FRAME_FADED ;
opts - > gbFactor = DEF_GB_FACTOR ;
opts - > gbLabel = GB_LBL_BOLD | GB_LBL_OUTSIDE ;
# if defined CONFIG_DIALOG || ( defined QT_VERSION && (QT_VERSION >= 0x040000))
# if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
opts - > stdBtnSizes = false ;
opts - > titlebarButtons = TITLEBAR_BUTTON_ROUND | TITLEBAR_BUTTON_HOVER_SYMBOL ;
opts - > titlebarIcon = TITLEBAR_ICON_NEXT_TO_TITLE ;
@ -2494,12 +2494,12 @@ static void defaultSettings(Options *opts)
opts - > titlebarAlignment = ALIGN_FULL_CENTER ;
opts - > titlebarEffect = EFFECT_SHADOW ;
opts - > centerTabText = false ;
# if defined QT_VERSION && (QT_VERSION >= 0x040000)
# if (0x039999 >= 0x040000)
opts - > xbar = false ;
opts - > dwtSettings = DWT_BUTTONS_AS_PER_TITLEBAR | DWT_ROUND_TOP_ONLY ;
opts - > menubarApps < < " amarok " < < " arora " < < " kaffeine " < < " kcalc " < < " smplayer " < < " VirtualBox " ;
opts - > statusbarApps < < " kde " ;
opts - > use QtFileDialogApps < < " googleearth-bin " ;
opts - > use T QtFileDialogApps < < " googleearth-bin " ;
opts - > noMenuBgndOpacityApps < < " inkscape " < < " inkscape " < < " sonata " < < " totem " ;
opts - > noBgndOpacityApps < < " smplayer " < < " kaffeine " < < " dragon " < < " kscreenlocker " < < " inkscape " < < " inkscape " < < " sonata " < < " totem " ;
# endif
@ -2543,7 +2543,7 @@ static void defaultSettings(Options *opts)
readConfig ( systemFilename , opts , opts ) ;
}
# if !defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION < 0x040000)
# if !defined CONFIG_DIALOG && (0x039999 < 0x040000)
if ( FOCUS_FILLED = = opts - > focus )
opts - > focus = FOCUS_FULL ;
# endif
@ -2628,7 +2628,7 @@ static const char *toStr(EMouseOver mo)
}
}
static QString toStr ( EAppearance exp , EAppAllow allow )
static T QString toStr ( EAppearance exp , EAppAllow allow )
{
switch ( exp )
{
@ -2669,7 +2669,7 @@ static QString toStr(EAppearance exp, EAppAllow allow)
}
default :
{
QString app ;
T QString app ;
app . sprintf ( " customgradient%d " , ( exp - APPEARANCE_CUSTOM1 ) + 1 ) ;
return app ;
@ -2677,15 +2677,15 @@ static QString toStr(EAppearance exp, EAppAllow allow)
}
}
static QString toStr ( const QColor & col )
static T QString toStr ( const T QColor & col )
{
QString colorStr ;
T QString colorStr ;
colorStr . sprintf ( " #%02X%02X%02X " , col . red ( ) , col . green ( ) , col . blue ( ) ) ;
return colorStr ;
}
static QString toStr ( EShade exp , const QColor & col )
static T QString toStr ( EShade exp , const T QColor & col )
{
switch ( exp )
{
@ -2960,7 +2960,7 @@ static const char * toStr(EImageType lv)
return " plainrings " ;
case IMG_BORDERED_RINGS :
return " rings " ;
case IMG_S QUARE_RINGS:
case IMG_S T QUARE_RINGS:
return " squarerings " ;
case IMG_FILE :
return " file " ;
@ -2983,8 +2983,8 @@ static const char * toStr(EGlow lv)
}
}
# if QT_VERSION >= 0x040000
# include < QTextStream>
# if 0x039999 >= 0x040000
# include < T QTextStream>
# define CFG config
# else
# define CFG (*cfg)
@ -3042,7 +3042,7 @@ static const char * toStr(EGlow lv)
if ( ! exportingStyle & & def . ENTRY = = opts . ENTRY ) \
CFG . deleteEntry ( # ENTRY ) ; \
else \
CFG . writeEntry ( # ENTRY , QStringList( opts . ENTRY . toList ( ) ) . join ( " , " ) ) ; \
CFG . writeEntry ( # ENTRY , T QStringList( opts . ENTRY . toList ( ) ) . join ( " , " ) ) ; \
bool static writeConfig ( KConfig * cfg , const Options & opts , const Options & def , bool exportingStyle = false )
{
@ -3052,10 +3052,10 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
if ( cfgDir )
{
# if QT_VERSION >= 0x040000
KConfig defCfg ( QFile: : decodeName ( cfgDir ) + CONFIG_FILE , KConfig : : SimpleConfig ) ;
# if 0x039999 >= 0x040000
KConfig defCfg ( T QFile: : decodeName ( cfgDir ) + CONFIG_FILE , KConfig : : SimpleConfig ) ;
# else
KConfig defCfg ( QFile: : decodeName ( cfgDir ) + CONFIG_FILE , false , false ) ;
KConfig defCfg ( T QFile: : decodeName ( cfgDir ) + CONFIG_FILE , false , false ) ;
# endif
if ( writeConfig ( & defCfg , opts , def , exportingStyle ) )
@ -3064,17 +3064,17 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
for ( int i = 0 ; oldFiles [ i ] ; + + i )
{
QString oldFileName ( QFile: : decodeName ( cfgDir ) + QString( " ../ " ) + oldFiles [ i ] ) ;
T QString oldFileName ( T QFile: : decodeName ( cfgDir ) + T QString( " ../ " ) + oldFiles [ i ] ) ;
if ( QFile: : exists ( oldFileName ) )
QFile: : remove ( oldFileName ) ;
if ( T QFile: : exists ( oldFileName ) )
T QFile: : remove ( oldFileName ) ;
}
}
}
}
else
{
# if QT_VERSION >= 0x040000
# if 0x039999 >= 0x040000
KConfigGroup config ( cfg , SETTINGS_GROUP ) ;
# else
cfg - > setGroup ( SETTINGS_GROUP ) ;
@ -3092,9 +3092,9 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
CFG_WRITE_ENTRY ( bgndGrad )
CFG_WRITE_ENTRY ( menuBgndGrad )
CFG_WRITE_APPEARANCE_ENTRY ( menuBgndAppearance , APP_ALLOW_STRIPED )
# ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
# ifdef T QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
CFG_WRITE_ENTRY ( fixParentlessDialogs )
# if defined QT_VERSION && (QT_VERSION >= 0x040000)
# if (0x039999 >= 0x040000)
CFG_WRITE_STRING_LIST_ENTRY ( noDlgFixApps )
# endif
# endif
@ -3202,14 +3202,14 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
CFG_WRITE_ENTRY_NUM ( windowDrag )
CFG_WRITE_ENTRY ( shadePopupMenu )
CFG_WRITE_ENTRY_NUM ( windowBorder )
# if defined QT_VERSION && (QT_VERSION >= 0x040000)
# if (0x039999 >= 0x040000)
CFG_WRITE_ENTRY ( xbar )
CFG_WRITE_ENTRY_NUM ( dwtSettings )
# endif
CFG_WRITE_ENTRY_NUM ( bgndOpacity )
CFG_WRITE_ENTRY_NUM ( menuBgndOpacity )
CFG_WRITE_ENTRY_NUM ( dlgOpacity )
# if defined CONFIG_DIALOG || ( defined QT_VERSION && (QT_VERSION >= 0x040000))
# if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
CFG_WRITE_ENTRY ( stdBtnSizes )
CFG_WRITE_ENTRY_NUM ( titlebarButtons )
CFG_WRITE_ENTRY ( titlebarIcon )
@ -3217,15 +3217,15 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
if ( ( opts . titlebarButtons & TITLEBAR_BUTTON_COLOR | | opts . titlebarButtons & TITLEBAR_BUTTON_ICON_COLOR ) & &
opts . titlebarButtonColors . size ( ) & & 0 = = ( opts . titlebarButtonColors . size ( ) % NUM_TITLEBAR_BUTTONS ) )
{
QString val ;
# if QT_VERSION >= 0x040000
QTextStream str ( & val ) ;
T QString val ;
# if 0x039999 >= 0x040000
T QTextStream str ( & val ) ;
# else
QTextStream str ( & val , IO_WriteOnly ) ;
T QTextStream str ( & val , IO_WriteOnly ) ;
# endif
for ( unsigned int i = 0 ; i < opts . titlebarButtonColors . size ( ) ; + + i )
{
TBCols : : const_iterator c ( opts . titlebarButtonColors . find( ( ETitleBarButtons ) i ) ) ;
TBCols : : const_iterator c ( opts . titlebarButtonColors . tq find( ( ETitleBarButtons ) i ) ) ;
if ( c ! = opts . titlebarButtonColors . end ( ) )
{
@ -3250,14 +3250,14 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
CFG_WRITE_ENTRY ( gtkComboMenus )
CFG_WRITE_ENTRY ( doubleGtkComboArrow )
CFG_WRITE_ENTRY ( gtkButtonOrder )
# if !defined __cplusplus || (defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION >= 0x040000))
# if !defined __cplusplus || (defined CONFIG_DIALOG && (0x039999 >= 0x040000))
CFG_WRITE_ENTRY ( reorderGtkButtons )
# endif
CFG_WRITE_ENTRY ( mapKdeIcons )
CFG_WRITE_ENTRY ( shading )
CFG_WRITE_ENTRY ( titlebarAlignment )
CFG_WRITE_ENTRY ( centerTabText )
# if defined QT_VERSION && (QT_VERSION >= 0x040000)
# if (0x039999 >= 0x040000)
CFG_WRITE_STRING_LIST_ENTRY ( noBgndGradientApps )
CFG_WRITE_STRING_LIST_ENTRY ( noBgndOpacityApps )
CFG_WRITE_STRING_LIST_ENTRY ( noMenuBgndOpacityApps )
@ -3265,13 +3265,13 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
CFG_WRITE_STRING_LIST_ENTRY ( noMenuStripeApps )
CFG_WRITE_STRING_LIST_ENTRY ( menubarApps )
CFG_WRITE_STRING_LIST_ENTRY ( statusbarApps )
CFG_WRITE_STRING_LIST_ENTRY ( use QtFileDialogApps)
CFG_WRITE_STRING_LIST_ENTRY ( use T QtFileDialogApps)
# endif
for ( int i = APPEARANCE_CUSTOM1 ; i < ( APPEARANCE_CUSTOM1 + NUM_CUSTOM_GRAD ) ; + + i )
{
GradientCont : : const_iterator cg ( opts . customGradient . find( ( EAppearance ) i ) ) ;
QString gradKey ;
GradientCont : : const_iterator cg ( opts . customGradient . tq find( ( EAppearance ) i ) ) ;
T QString gradKey ;
gradKey . sprintf ( " customgradient%d " , ( i - APPEARANCE_CUSTOM1 ) + 1 ) ;
@ -3281,13 +3281,13 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
{
GradientCont : : const_iterator d ;
if ( exportingStyle | | ( d = def . customGradient . find( ( EAppearance ) i ) ) = = def . customGradient . end ( ) | | ! ( ( * d ) = = ( * cg ) ) )
if ( exportingStyle | | ( d = def . customGradient . tq find( ( EAppearance ) i ) ) = = def . customGradient . end ( ) | | ! ( ( * d ) = = ( * cg ) ) )
{
QString gradVal ;
# if QT_VERSION >= 0x040000
QTextStream str ( & gradVal ) ;
T QString gradVal ;
# if 0x039999 >= 0x040000
T QTextStream str ( & gradVal ) ;
# else
QTextStream str ( & gradVal , IO_WriteOnly ) ;
T QTextStream str ( & gradVal , IO_WriteOnly ) ;
# endif
GradientStopCont stops ( ( * cg ) . second . stops . fix ( ) ) ;
GradientStopCont : : const_iterator it ( stops . begin ( ) ) ,
@ -3323,11 +3323,11 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
opts . customShades [ 4 ] ! = def . customShades [ 4 ] | |
opts . customShades [ 5 ] ! = def . customShades [ 5 ] )
{
QString shadeVal ;
# if QT_VERSION >= 0x040000
QTextStream str ( & shadeVal ) ;
T QString shadeVal ;
# if 0x039999 >= 0x040000
T QTextStream str ( & shadeVal ) ;
# else
QTextStream str ( & shadeVal , IO_WriteOnly ) ;
T QTextStream str ( & shadeVal , IO_WriteOnly ) ;
# endif
if ( 0 = = opts . customShades [ 0 ] )
str < < 0 ;