Commit 58042614 authored by Gustavo Carneiro's avatar Gustavo Carneiro Committed by Kurt Hindenburg

ColorScheme Library remove private_core.

parent a08f907c
set(konsole_colorscheme_SRCS
hsluv.c
ColorScheme.cpp
......@@ -11,14 +12,20 @@ ki18n_wrap_ui(konsole_colorscheme_SRCS
ColorSchemeEditor.ui
)
ecm_qt_declare_logging_category(
konsole_colorscheme_SRCS
HEADER colorschemedebug.h
IDENTIFIER ColorSchemeDebug
CATEGORY_NAME org.kde.konsole.colorScheme
)
add_library(konsolecolorscheme
STATIC
${konsole_colorscheme_SRCS}
)
generate_export_header(konsolecolorscheme BASE_NAME konsolecolorscheme)
target_include_directories(konsolecolorscheme PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(
konsolecolorscheme
${konsole_LIBS}
konsoleprivate_core
)
......@@ -35,7 +35,7 @@
#include <random>
// Konsole
#include "konsoledebug.h"
#include "colorschemedebug.h"
#include "ColorSchemeWallpaper.h"
namespace {
......@@ -254,7 +254,7 @@ void ColorScheme::setColorTableEntry(int index, const ColorEntry &entry)
_table[index] = entry;
} else {
_table[index] = defaultTable[index];
qCDebug(KonsoleDebug)<<"ColorScheme"<<name()<<"has an invalid color index"<<index<<", using default table color";
qCDebug(ColorSchemeDebug)<<"ColorScheme"<<name()<<"has an invalid color index"<<index<<", using default table color";
}
}
......@@ -417,7 +417,7 @@ bool ColorScheme::hasDarkBackground() const
void ColorScheme::setOpacity(qreal opacity)
{
if (opacity < 0.0 || opacity > 1.0) {
qCDebug(KonsoleDebug)<<"ColorScheme"<<name()<<"has an invalid opacity"<<opacity<<"using 1";
qCDebug(ColorSchemeDebug)<<"ColorScheme"<<name()<<"has an invalid opacity"<<opacity<<"using 1";
opacity = 1.0;
}
_opacity = opacity;
......@@ -472,7 +472,7 @@ void ColorScheme::readColorEntry(const KConfig &config, int index)
const auto readAndCheckConfigEntry = [&](const char *key, double min, double max) -> double {
const double value = configGroup.readEntry(key, min);
if (min > value || value > max) {
qCDebug(KonsoleDebug) << QStringLiteral(
qCDebug(ColorSchemeDebug) << QStringLiteral(
"Color scheme \"%1\": color index 2 has an invalid value: %3 = %4. "
"Allowed value range: %5 - %6. Using %7.")
.arg(name()).arg(index).arg(QLatin1String(key)).arg(value, 0, 'g', 1)
......
......@@ -26,7 +26,7 @@
// KDE
#include <QDialog>
#include "konsoleprivate_export.h"
#include "konsolecolorscheme_export.h"
class QTableWidgetItem;
......@@ -49,7 +49,7 @@ class ColorScheme;
*
* When changes are made the colorsChanged() signal is emitted.
*/
class KONSOLEPRIVATE_EXPORT ColorSchemeEditor : public QDialog
class KONSOLECOLORSCHEME_EXPORT ColorSchemeEditor : public QDialog
{
Q_OBJECT
......
......@@ -23,7 +23,7 @@
// Own
#include "ColorSchemeManager.h"
#include "konsoledebug.h"
#include "colorschemedebug.h"
// Qt
#include <QFileInfo>
......@@ -65,7 +65,7 @@ void ColorSchemeManager::loadAllColorSchemes()
}
if (failed > 0) {
qCDebug(KonsoleDebug) << "failed to load " << failed << " color schemes.";
qCDebug(ColorSchemeDebug) << "failed to load " << failed << " color schemes.";
}
_haveLoadedAll = true;
......@@ -94,7 +94,7 @@ bool ColorSchemeManager::loadColorScheme(const QString &filePath)
scheme->read(config);
if (scheme->name().isEmpty()) {
qCDebug(KonsoleDebug) << "Color scheme in" << filePath
qCDebug(ColorSchemeDebug) << "Color scheme in" << filePath
<< "does not have a valid name and was not loaded.";
delete scheme;
return false;
......@@ -182,7 +182,7 @@ bool ColorSchemeManager::deleteColorScheme(const QString &name)
delete _colorSchemes.take(name);
return true;
}
qCDebug(KonsoleDebug)<<"Failed to remove color scheme -"<<path;
qCDebug(ColorSchemeDebug)<<"Failed to remove color scheme -"<<path;
return false;
}
......@@ -196,7 +196,7 @@ const ColorScheme *ColorSchemeManager::findColorScheme(const QString &name)
// Konsole will create a sub-folder in that case (bko 315086)
// More code will have to go in to prevent the users from doing that.
if (name.contains(QLatin1String("/"))) {
qCDebug(KonsoleDebug)<<name<<" has an invalid character / in the name ... skipping";
qCDebug(ColorSchemeDebug)<<name<<" has an invalid character / in the name ... skipping";
return defaultColorScheme();
}
......@@ -209,7 +209,7 @@ const ColorScheme *ColorSchemeManager::findColorScheme(const QString &name)
return findColorScheme(name);
}
qCDebug(KonsoleDebug) << "Could not find color scheme - " << name;
qCDebug(ColorSchemeDebug) << "Could not find color scheme - " << name;
return nullptr;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment