Code style
This commit is contained in:
parent
c940e44b63
commit
7347abbac5
|
@ -29,18 +29,19 @@ private Q_SLOTS:
|
|||
void displayTestPlain();
|
||||
|
||||
private:
|
||||
void testString(QString message){
|
||||
void testString(QString message)
|
||||
{
|
||||
qDebug() << Utils::normalizeMarkup(message, Utils::NO_MARKUP);
|
||||
SnoreCore &snore = SnoreCore::instance();
|
||||
QStringList backends = snore.pluginNames(SnorePlugin::BACKEND);
|
||||
auto notify = [&backends, &snore, &message, this](Notification n){
|
||||
auto notify = [&backends, &snore, &message, this](Notification n) {
|
||||
qDebug() << n << "closed";
|
||||
qDebug() << backends.size();
|
||||
if(backends.empty()) {
|
||||
if (backends.empty()) {
|
||||
return;
|
||||
}
|
||||
QString old = snore.primaryNotificationBackend();
|
||||
while(snore.primaryNotificationBackend() == old) {
|
||||
while (snore.primaryNotificationBackend() == old) {
|
||||
QString p = backends.takeLast();
|
||||
snore.setSettingsValue(QLatin1String("PrimaryBackend"), p, LOCAL_SETTING);
|
||||
SnoreCorePrivate::instance()->syncSettings();
|
||||
|
@ -60,21 +61,18 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
void DisplayTest::displayTest()
|
||||
{
|
||||
app.hints().setValue("use-markup", true);
|
||||
testString(QLatin1String("<b>TestΩ</b>💩😀"));
|
||||
}
|
||||
|
||||
|
||||
void DisplayTest::displayTestPlain()
|
||||
{
|
||||
app.hints().setValue("use-markup", false);
|
||||
testString(QString::fromWCharArray(L"Test\u03A9\U0001F4A9\U0001F600"));
|
||||
}
|
||||
|
||||
|
||||
QTEST_MAIN(DisplayTest)
|
||||
|
||||
#include "display_test.moc"
|
||||
|
|
|
@ -34,8 +34,8 @@ NotifyWidget::NotifyWidget(int pos, const SnoreNotifier *parent) :
|
|||
|
||||
QString font = qApp->font().family();
|
||||
#ifdef Q_OS_WIN
|
||||
switch(QSysInfo::windowsVersion()){
|
||||
case QSysInfo::WV_WINDOWS8:
|
||||
switch (QSysInfo::windowsVersion()) {
|
||||
case QSysInfo::WV_WINDOWS8:
|
||||
font = QLatin1String("Segoe UI Symbol");
|
||||
break;
|
||||
#if QT_VERSION_CHECK(5,5,0)
|
||||
|
|
Loading…
Reference in New Issue