"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/common/ColorThemeWorker.cpp" between
cutter-1.10.2.tar.gz and cutter-1.10.3.tar.gz

About: cutter is a Qt and C++ GUI for radare2 reverse engineering framework.

ColorThemeWorker.cpp  (cutter-1.10.2):ColorThemeWorker.cpp  (cutter-1.10.3)
skipping to change at line 79 skipping to change at line 79
QDir currDir { QStringLiteral("%1%2%3") QDir currDir { QStringLiteral("%1%2%3")
.arg(r_sys_prefix(nullptr)) .arg(r_sys_prefix(nullptr))
.arg(R_SYS_DIR) .arg(R_SYS_DIR)
.arg(R2_THEMES) .arg(R2_THEMES)
}; };
if (currDir.exists()) { if (currDir.exists()) {
standardR2ThemesLocationPath = currDir.absolutePath(); standardR2ThemesLocationPath = currDir.absolutePath();
} else { } else {
QMessageBox::critical(nullptr, QMessageBox::critical(nullptr,
tr("Standard themes not found"), tr("Standard themes not found"),
tr("The radare2 standard themes could not be found. " tr("The radare2 standard themes could not be found in '%1'. "
"Most likely, radare2 is not properly installed.") "Most likely, radare2 is not properly installed.")
.arg(currDir.path())
); );
} }
} }
QColor ColorThemeWorker::mergeColors(const QColor& upper, const QColor& lower) c onst QColor ColorThemeWorker::mergeColors(const QColor& upper, const QColor& lower) c onst
{ {
qreal r1, g1, b1, a1; qreal r1, g1, b1, a1;
qreal r2, g2, b2, a2; qreal r2, g2, b2, a2;
qreal r, g, b, a; qreal r, g, b, a;
skipping to change at line 169 skipping to change at line 170
return themes.contains(name); return themes.contains(name);
} }
QJsonDocument ColorThemeWorker::getTheme(const QString& themeName) const QJsonDocument ColorThemeWorker::getTheme(const QString& themeName) const
{ {
int r, g, b, a; int r, g, b, a;
QVariantMap theme; QVariantMap theme;
QString curr = Config()->getColorTheme(); QString curr = Config()->getColorTheme();
if (themeName != curr) { if (themeName != curr) {
Core()->cmd(QString("eco %1").arg(themeName)); Core()->cmdRaw(QString("eco %1").arg(themeName));
theme = Core()->cmdj("ecj").object().toVariantMap(); theme = Core()->cmdj("ecj").object().toVariantMap();
Core()->cmd(QString("eco %1").arg(curr)); Core()->cmdRaw(QString("eco %1").arg(curr));
} else { } else {
theme = Core()->cmdj("ecj").object().toVariantMap(); theme = Core()->cmdj("ecj").object().toVariantMap();
} }
for (auto it = theme.begin(); it != theme.end(); it++) { for (auto it = theme.begin(); it != theme.end(); it++) {
auto arr = it.value().toList(); auto arr = it.value().toList();
QColor(arr[0].toInt(), arr[1].toInt(), arr[2].toInt()).getRgb(&r, &g, &b , &a); QColor(arr[0].toInt(), arr[1].toInt(), arr[2].toInt()).getRgb(&r, &g, &b , &a);
theme[it.key()] = QJsonArray({r, g, b, a}); theme[it.key()] = QJsonArray({r, g, b, a});
} }
 End of changes. 4 change blocks. 
3 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)