code style
This commit is contained in:
parent
1a9b29a2ca
commit
51131cf2bd
|
@ -63,7 +63,6 @@ void TrayIcon::initConextMenu()
|
|||
});
|
||||
m_settings->layout()->addWidget(box);
|
||||
|
||||
|
||||
// connect(m_settings, &SettingsDialog::finished, m_settings, &SettingsDialog::hide);
|
||||
|
||||
m_trayIcon->setVisible(true);
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
using namespace Snore;
|
||||
|
||||
|
||||
Notification::Notification() :
|
||||
d(NULL)
|
||||
{
|
||||
|
|
|
@ -140,7 +140,6 @@ const QList<SnorePlugin::PluginTypes> &SnorePlugin::types()
|
|||
return t;
|
||||
}
|
||||
|
||||
|
||||
QDebug operator<<(QDebug debug, const Snore::SnorePlugin::PluginTypes &flags)
|
||||
{
|
||||
QMetaEnum e = SnorePlugin::staticMetaObject.enumerator(SnorePlugin::staticMetaObject.indexOfEnumerator("PluginType"));
|
||||
|
@ -164,7 +163,6 @@ QDebug operator<<(QDebug debug, const Snore::SnorePlugin::PluginTypes &flags)
|
|||
|
||||
}
|
||||
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const Snore::SnorePlugin::PluginTypes &type)
|
||||
{
|
||||
out << static_cast<int>(type);
|
||||
|
|
|
@ -47,7 +47,6 @@ public:
|
|||
static QString typeToString(const PluginTypes t);
|
||||
static const QList<PluginTypes> &types();
|
||||
|
||||
|
||||
SnorePlugin(const QString &name);
|
||||
virtual ~SnorePlugin();
|
||||
virtual bool initialize();
|
||||
|
@ -90,5 +89,4 @@ SNORE_EXPORT QDebug operator<<(QDebug, const Snore::SnorePlugin::PluginTypes &);
|
|||
SNORE_EXPORT QDataStream &operator<<(QDataStream &out, const Snore::SnorePlugin::PluginTypes &type);
|
||||
SNORE_EXPORT QDataStream &operator>>(QDataStream &in, Snore::SnorePlugin::PluginTypes &type);
|
||||
|
||||
|
||||
#endif//SNORE_PLUGINS_H
|
||||
|
|
|
@ -43,8 +43,7 @@ SettingsDialog::~SettingsDialog()
|
|||
void SettingsDialog::initTabs()
|
||||
{
|
||||
SnorePlugin::PluginTypes types = SnoreCore::instance().value("PluginTypes", LOCAL_SETTING).value<SnorePlugin::PluginTypes>();
|
||||
if(types == SnorePlugin::NONE)
|
||||
{
|
||||
if (types == SnorePlugin::NONE) {
|
||||
types = SnorePlugin::ALL;
|
||||
}
|
||||
auto addWidgets = [&](QTabWidget * target, QWidget * container, SnorePlugin::PluginTypes type) {
|
||||
|
|
|
@ -51,7 +51,6 @@ public:
|
|||
//TODO: move to private header
|
||||
void initTabs();
|
||||
|
||||
|
||||
public slots:
|
||||
void setVisible(bool b) override;
|
||||
void accept();
|
||||
|
|
|
@ -173,7 +173,8 @@ void SnoreCorePrivate::syncSettings()
|
|||
}
|
||||
}
|
||||
|
||||
QStringList SnoreCorePrivate::knownClients(){
|
||||
QStringList SnoreCorePrivate::knownClients()
|
||||
{
|
||||
QStringList out;
|
||||
m_settings->beginGroup(versionSchema());
|
||||
m_settings->beginGroup("LocalSettings");
|
||||
|
@ -234,19 +235,16 @@ void SnoreCorePrivate::slotAboutToQuit()
|
|||
}
|
||||
}
|
||||
|
||||
void SnoreCorePrivate::loadTranslator(){
|
||||
auto installTranslator = [](const QString &locale)
|
||||
void SnoreCorePrivate::loadTranslator()
|
||||
{
|
||||
auto installTranslator = [](const QString & locale) {
|
||||
snoreDebug(SNORE_DEBUG) << locale;
|
||||
if (locale != "C") {
|
||||
QTranslator *translator = new QTranslator(qApp->instance());
|
||||
if ( translator->load(locale, ":/lang/libsnore/") )
|
||||
{
|
||||
if (translator->load(locale, ":/lang/libsnore/")) {
|
||||
snoreDebug(SNORE_INFO) << "Using system locale:" << locale;
|
||||
snoreDebug(SNORE_INFO) << qApp->installTranslator(translator);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
translator->deleteLater();
|
||||
QString fileName = QString(":/lang/libsnore/%1.qm").arg(locale);
|
||||
snoreDebug(SNORE_WARNING) << "Failed to load translations for:" << locale << fileName << QFile::exists(fileName) ;
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
#include <QMainWindow>
|
||||
|
||||
namespace Ui {
|
||||
namespace Ui
|
||||
{
|
||||
class SettingsWindow;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue