summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/gui
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/gui')
-rw-r--r--utils/themeeditor/gui/configdocument.cpp10
-rw-r--r--utils/themeeditor/gui/editorwindow.cpp2
-rw-r--r--utils/themeeditor/gui/preferencesdialog.cpp6
-rw-r--r--utils/themeeditor/gui/projectexporter.cpp2
-rw-r--r--utils/themeeditor/gui/skindocument.cpp16
-rw-r--r--utils/themeeditor/gui/skinhighlighter.cpp14
6 files changed, 25 insertions, 25 deletions
diff --git a/utils/themeeditor/gui/configdocument.cpp b/utils/themeeditor/gui/configdocument.cpp
index aaea3aa1e2..0083899770 100644
--- a/utils/themeeditor/gui/configdocument.cpp
+++ b/utils/themeeditor/gui/configdocument.cpp
@@ -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 */
diff --git a/utils/themeeditor/gui/editorwindow.cpp b/utils/themeeditor/gui/editorwindow.cpp
index 71b0c07405..89c9d670aa 100644
--- a/utils/themeeditor/gui/editorwindow.cpp
+++ b/utils/themeeditor/gui/editorwindow.cpp
@@ -874,7 +874,7 @@ void EditorWindow::createFile(QString filename, QString contents)
QFile fout(filename);
fout.open(QFile::WriteOnly);
- fout.write(contents.toAscii());
+ fout.write(contents.toLatin1());
fout.close();
}
diff --git a/utils/themeeditor/gui/preferencesdialog.cpp b/utils/themeeditor/gui/preferencesdialog.cpp
index 2c4acaee84..4ab6fdadcc 100644
--- a/utils/themeeditor/gui/preferencesdialog.cpp
+++ b/utils/themeeditor/gui/preferencesdialog.cpp
@@ -85,13 +85,13 @@ void PreferencesDialog::loadColors()
/* Buttons from the editor group */
settings.beginGroup("SkinDocument");
- fgColor = settings.value("fgColor", Qt::black).value<QColor>();
+ fgColor = settings.value("fgColor", QColor(Qt::black)).value<QColor>();
setButtonColor(ui->fgButton, fgColor);
- bgColor = settings.value("bgColor", Qt::white).value<QColor>();
+ bgColor = settings.value("bgColor", QColor(Qt::white)).value<QColor>();
setButtonColor(ui->bgButton, bgColor);
- errorColor = settings.value("errorColor", Qt::red).value<QColor>();
+ errorColor = settings.value("errorColor", QColor(Qt::red)).value<QColor>();
setButtonColor(ui->errorButton, errorColor);
settings.endGroup();
diff --git a/utils/themeeditor/gui/projectexporter.cpp b/utils/themeeditor/gui/projectexporter.cpp
index 35fa90d060..ae47758dcf 100644
--- a/utils/themeeditor/gui/projectexporter.cpp
+++ b/utils/themeeditor/gui/projectexporter.cpp
@@ -204,7 +204,7 @@ void ProjectExporter::checkWPS(ProjectModel* project, QString file)
fin.close();
skin_element* root;
- root = skin_parse(contents.toAscii());
+ root = skin_parse(contents.toLatin1());
if(!root)
{
addWarning(tr("Couldn't parse ") + file.split("/").last());
diff --git a/utils/themeeditor/gui/skindocument.cpp b/utils/themeeditor/gui/skindocument.cpp
index 1ee6b6e7ee..807478807d 100644
--- a/utils/themeeditor/gui/skindocument.cpp
+++ b/utils/themeeditor/gui/skindocument.cpp
@@ -197,14 +197,14 @@ void SkinDocument::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 */
@@ -227,7 +227,7 @@ void SkinDocument::cursorChanged()
QTextCursor line = editor->textCursor();
line.movePosition(QTextCursor::StartOfLine);
line.movePosition(QTextCursor::EndOfLine, QTextCursor::KeepAnchor);
- skin_parse(line.selectedText().toAscii());
+ skin_parse(line.selectedText().toLatin1());
if(skin_error_line() > 0)
parseStatus = tr("Error on line ") +
QString::number(line.blockNumber() + 1)
@@ -263,7 +263,7 @@ void SkinDocument::codeChanged()
editor->clearErrors();
parseStatus = model->changeTree(editor->document()->
- toPlainText().toAscii());
+ toPlainText().toLatin1());
treeInSync = true;
emit antiSync(false);
@@ -294,7 +294,7 @@ void SkinDocument::codeChanged()
rest.removeSelectedText();
base += skin_error_line();
- skin_parse(doc.toPlainText().toAscii());
+ skin_parse(doc.toPlainText().toLatin1());
if(skin_error_line() > 0)
editor->addError(base + skin_error_line());
@@ -338,7 +338,7 @@ void SkinDocument::save()
}
fout.open(QFile::WriteOnly);
- fout.write(editor->document()->toPlainText().toAscii());
+ fout.write(editor->document()->toPlainText().toLatin1());
fout.close();
saved = editor->document()->toPlainText();
@@ -372,7 +372,7 @@ void SkinDocument::saveAs()
QFile fout(fileName);
fout.open(QFile::WriteOnly);
- fout.write(editor->document()->toPlainText().toAscii());
+ fout.write(editor->document()->toPlainText().toLatin1());
fout.close();
saved = editor->document()->toPlainText();
diff --git a/utils/themeeditor/gui/skinhighlighter.cpp b/utils/themeeditor/gui/skinhighlighter.cpp
index 92475dc5fd..9236cce2b6 100644
--- a/utils/themeeditor/gui/skinhighlighter.cpp
+++ b/utils/themeeditor/gui/skinhighlighter.cpp
@@ -63,7 +63,7 @@ void SkinHighlighter::highlightBlock(const QString& text)
if(text.length() - i < 2)
return;
- if(find_escape_character(text[i + 1].toAscii()))
+ if(find_escape_character(text[i + 1].toLatin1()))
{
/* Checking for escaped characters */
@@ -82,8 +82,8 @@ void SkinHighlighter::highlightBlock(const QString& text)
if(text.length() - i >= 3)
{
- lookup[0] = text[i + 1].toAscii();
- lookup[1] = text[i + 2].toAscii();
+ lookup[0] = text[i + 1].toLatin1();
+ lookup[1] = text[i + 2].toLatin1();
found = find_tag(lookup);
}
@@ -96,7 +96,7 @@ void SkinHighlighter::highlightBlock(const QString& text)
else
{
lookup[1] = '\0';
- lookup[0] = text[i + 1].toAscii();
+ lookup[0] = text[i + 1].toLatin1();
found = find_tag(lookup);
if(found)
@@ -121,8 +121,8 @@ void SkinHighlighter::highlightBlock(const QString& text)
if(text.length() - i >= 4)
{
- lookup[0] = text[i + 2].toAscii();
- lookup[1] = text[i + 3].toAscii();
+ lookup[0] = text[i + 2].toLatin1();
+ lookup[1] = text[i + 3].toLatin1();
found = find_tag(lookup);
}
@@ -135,7 +135,7 @@ void SkinHighlighter::highlightBlock(const QString& text)
else
{
lookup[1] = '\0';
- lookup[0] = text[i + 2].toAscii();
+ lookup[0] = text[i + 2].toLatin1();
found = find_tag(lookup);