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:
@@ -177,7 +177,7 @@ void ChangeSelectionDialog::acceptShow()
|
||||
//! Set commit message in details
|
||||
void ChangeSelectionDialog::setDetails(int exitCode)
|
||||
{
|
||||
QPalette palette = m_ui->changeNumberEdit->palette();
|
||||
QPalette palette;
|
||||
if (exitCode == 0) {
|
||||
m_ui->detailsText->setPlainText(QString::fromUtf8(m_process->readAllStandardOutput()));
|
||||
palette.setColor(QPalette::Text, Qt::black);
|
||||
|
||||
Reference in New Issue
Block a user