@@ -125,25 +125,25 @@ const char *const ColorScheme::translatedColorNames[TABLE_COLORS] =
125
125
126
126
ColorScheme::ColorScheme ()
127
127
{
128
- _table = 0 ;
129
- _randomTable = 0 ;
128
+ _table = nullptr ;
129
+ _randomTable = nullptr ;
130
130
_opacity = 1.0 ;
131
131
}
132
132
ColorScheme::ColorScheme ( const ColorScheme &other )
133
133
: _opacity( other._opacity )
134
- , _table( 0 )
135
- , _randomTable( 0 )
134
+ , _table( nullptr )
135
+ , _randomTable( nullptr )
136
136
{
137
137
setName ( other.name () );
138
138
setDescription ( other.description () );
139
139
140
- if ( other._table != 0 )
140
+ if ( other._table )
141
141
{
142
142
for ( int i = 0 ; i < TABLE_COLORS ; i++ )
143
143
setColorTableEntry ( i, other._table [i] );
144
144
}
145
145
146
- if ( other._randomTable != 0 )
146
+ if ( other._randomTable )
147
147
{
148
148
for ( int i = 0 ; i < TABLE_COLORS ; i++ )
149
149
{
@@ -188,7 +188,7 @@ ColorEntry ColorScheme::colorEntry( int index, uint randomSeed ) const
188
188
ColorEntry entry = colorTable ()[index ];
189
189
190
190
if ( randomSeed != 0 &&
191
- _randomTable != 0 &&
191
+ _randomTable &&
192
192
!_randomTable[index ].isNull () )
193
193
{
194
194
const RandomizationRange &range = _randomTable[index ];
@@ -216,7 +216,7 @@ void ColorScheme::getColorTable( ColorEntry *table, uint randomSeed ) const
216
216
}
217
217
bool ColorScheme::randomizedBackgroundColor () const
218
218
{
219
- return _randomTable == 0 ? false : !_randomTable[1 ].isNull ();
219
+ return _randomTable ? false : !_randomTable[1 ].isNull ();
220
220
}
221
221
void ColorScheme::setRandomizedBackgroundColor ( bool randomize )
222
222
{
@@ -241,7 +241,7 @@ void ColorScheme::setRandomizationRange( int index, quint16 hue, quint8 saturati
241
241
Q_ASSERT ( hue <= MAX_HUE );
242
242
Q_ASSERT ( index >= 0 && index < TABLE_COLORS );
243
243
244
- if ( _randomTable == 0 )
244
+ if ( ! _randomTable )
245
245
_randomTable = new RandomizationRange[TABLE_COLORS];
246
246
247
247
_randomTable[index ].hue = hue;
@@ -696,15 +696,16 @@ QList<QString> ColorSchemeManager::listKDE3ColorSchemes()
696
696
filters << QStringLiteral ( " *.schema" );
697
697
dir.setNameFilters ( filters );
698
698
QStringList list = dir.entryList ( filters );
699
- QStringList ret;
699
+ QList<QString> ret;
700
700
foreach ( QString i, list )
701
701
ret << dname + " /" + i;
702
- return std::move ( ret ) ;
702
+ return ret;
703
703
// return KGlobal::dirs()->findAllResources("data",
704
704
// "konsole/*.schema",
705
705
// KStandardDirs::NoDuplicates);
706
706
//
707
707
}
708
+
708
709
QList<QString> ColorSchemeManager::listColorSchemes ()
709
710
{
710
711
QString dname ( get_color_schemes_dir () );
@@ -713,10 +714,10 @@ QList<QString> ColorSchemeManager::listColorSchemes()
713
714
filters << QStringLiteral ( " *.colorscheme" );
714
715
dir.setNameFilters ( filters );
715
716
QStringList list = dir.entryList ( filters );
716
- QStringList ret;
717
+ QList<QString> ret;
717
718
foreach ( QString i, list )
718
719
ret << dname + " /" + i;
719
- return std::move ( ret ) ;
720
+ return ret;
720
721
// return KGlobal::dirs()->findAllResources("data",
721
722
// "konsole/*.colorscheme",
722
723
// KStandardDirs::NoDuplicates);
@@ -778,11 +779,11 @@ const ColorScheme *ColorSchemeManager::findColorScheme( const QString &name )
778
779
779
780
qDebug () << " Could not find color scheme - " << name;
780
781
781
- return 0 ;
782
+ return nullptr ;
782
783
}
783
784
}
784
785
785
- ColorSchemeManager *ColorSchemeManager::sColorSchemeManager = 0 ;
786
+ ColorSchemeManager *ColorSchemeManager::sColorSchemeManager = nullptr ;
786
787
// K_GLOBAL_STATIC( ColorSchemeManager , colorSchemeManager )
787
788
ColorSchemeManager *ColorSchemeManager::instance ()
788
789
{
0 commit comments