forked from qt-creator/qt-creator
		
	Optimize usage of QPalette
setPalette() does not replace the old one but rather adds the difference. Thus a previous copy of the palette is unnecessary. Change-Id: I5c06da456b76144efc4a984ccda13c7d2243a7bc Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
		@@ -99,7 +99,7 @@ void CheckoutProgressWizardPage::slotFinished(bool ok, int exitCode, const QVari
 | 
			
		||||
            m_state = Succeeded;
 | 
			
		||||
            QApplication::restoreOverrideCursor();
 | 
			
		||||
            ui->statusLabel->setText(tr("Succeeded."));
 | 
			
		||||
            QPalette palette = ui->statusLabel->palette();
 | 
			
		||||
            QPalette palette;
 | 
			
		||||
            palette.setColor(QPalette::Active, QPalette::Text, Qt::green);
 | 
			
		||||
            ui->statusLabel->setPalette(palette);
 | 
			
		||||
            emit completeChanged();
 | 
			
		||||
@@ -111,7 +111,7 @@ void CheckoutProgressWizardPage::slotFinished(bool ok, int exitCode, const QVari
 | 
			
		||||
            m_state = Failed;
 | 
			
		||||
            QApplication::restoreOverrideCursor();
 | 
			
		||||
            ui->statusLabel->setText(tr("Failed."));
 | 
			
		||||
            QPalette palette = ui->statusLabel->palette();
 | 
			
		||||
            QPalette palette;
 | 
			
		||||
            palette.setColor(QPalette::Active, QPalette::Text, Qt::red);
 | 
			
		||||
            ui->statusLabel->setPalette(palette);
 | 
			
		||||
            emit terminated(false);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user