projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow reloading stylesheets at runtime
[quassel.git]
/
src
/
uisupport
/
uistyle.cpp
diff --git
a/src/uisupport/uistyle.cpp
b/src/uisupport/uistyle.cpp
index
332344c
..
4964692
100644
(file)
--- a/
src/uisupport/uistyle.cpp
+++ b/
src/uisupport/uistyle.cpp
@@
-51,6
+51,7
@@
UiStyle::UiStyle(QObject *parent) : QObject(parent) {
_formatCodes["%DU"] = Url;
setTimestampFormatString("[hh:mm:ss]");
_formatCodes["%DU"] = Url;
setTimestampFormatString("[hh:mm:ss]");
+
loadStyleSheet();
}
loadStyleSheet();
}
@@
-58,6
+59,10
@@
UiStyle::~UiStyle() {
qDeleteAll(_metricsCache);
}
qDeleteAll(_metricsCache);
}
+void UiStyle::reload() {
+ loadStyleSheet();
+}
+
void UiStyle::loadStyleSheet() {
qDeleteAll(_metricsCache);
_metricsCache.clear();
void UiStyle::loadStyleSheet() {
qDeleteAll(_metricsCache);
_metricsCache.clear();
@@
-230,7
+235,8
@@
UiStyle::FormatType UiStyle::formatType(Message::Type msgType) {
case Message::DayChange:
return DayChangeMsg;
}
case Message::DayChange:
return DayChangeMsg;
}
- Q_ASSERT(false); // we need to handle all message types
+ //Q_ASSERT(false); // we need to handle all message types
+ qWarning() << Q_FUNC_INFO << "Unknown message type:" << msgType;
return ErrorMsg;
}
return ErrorMsg;
}