forked from len0rd/rockbox
themeeditor: Make it compile with current Qt5.
- Replace use of obsolete members with their replacements. - Fix type issue that requires explicitly creating the right object now. - Update project file to work with Qt5. Change-Id: I3af2b1520796e977e58c0a01e165c77c469a23b9
This commit is contained in:
parent
ff38666a19
commit
fa330c109d
10 changed files with 35 additions and 35 deletions
|
@ -143,7 +143,7 @@ void ConfigDocument::save()
|
|||
}
|
||||
|
||||
fout.open(QFile::WriteOnly);
|
||||
fout.write(toPlainText().toAscii());
|
||||
fout.write(toPlainText().toLatin1());
|
||||
fout.close();
|
||||
|
||||
saved = toPlainText();
|
||||
|
@ -174,7 +174,7 @@ void ConfigDocument::saveAs()
|
|||
|
||||
QFile fout(filePath);
|
||||
fout.open(QFile::WriteOnly);
|
||||
fout.write(toPlainText().toAscii());
|
||||
fout.write(toPlainText().toLatin1());
|
||||
fout.close();
|
||||
|
||||
saved = toPlainText();
|
||||
|
@ -415,14 +415,14 @@ void ConfigDocument::settingsChanged()
|
|||
QSettings settings;
|
||||
settings.beginGroup("SkinDocument");
|
||||
|
||||
QColor fg = settings.value("fgColor", Qt::black).value<QColor>();
|
||||
QColor bg = settings.value("bgColor", Qt::white).value<QColor>();
|
||||
QColor fg = settings.value("fgColor", QColor(Qt::black)).value<QColor>();
|
||||
QColor bg = settings.value("bgColor", QColor(Qt::white)).value<QColor>();
|
||||
QPalette palette;
|
||||
palette.setColor(QPalette::All, QPalette::Base, bg);
|
||||
palette.setColor(QPalette::All, QPalette::Text, fg);
|
||||
editor->setPalette(palette);
|
||||
|
||||
QColor highlight = settings.value("errorColor", Qt::red).value<QColor>();
|
||||
QColor highlight = settings.value("errorColor", QColor(Qt::red)).value<QColor>();
|
||||
editor->setErrorColor(highlight);
|
||||
|
||||
/* Setting the font */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue