Optimize memory usage

pull/9/head
reionwong 5 years ago
parent da4a5e1997
commit 868545255b

@ -61,7 +61,7 @@ Launcher::Launcher(QQuickView *w)
m_hideTimer->setSingleShot(true);
connect(m_hideTimer, &QTimer::timeout, this, [=] { setVisible(false); });
if (m_dockInterface.isValid()) {
if (m_dockInterface.isValid() && !m_dockInterface.lastError().isValid()) {
updateMargins();
connect(&m_dockInterface, SIGNAL(primaryGeometryChanged()), this, SLOT(updateMargins()));
connect(&m_dockInterface, SIGNAL(directionChanged()), this, SLOT(updateMargins()));

@ -20,6 +20,7 @@
#include <QApplication>
#include <QDBusConnection>
#include <QDBusInterface>
#include <QPixmapCache>
#include "launcher.h"
#include "launcheritem.h"
@ -54,6 +55,8 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
app.setApplicationName(QStringLiteral("cutefish-launcher"));
QPixmapCache::setCacheLimit(1024 * 10);
// QCommandLineParser parser;
// QCommandLineOption showOption(QStringLiteral("show"), "Show Launcher");
// parser.addOption(showOption);

Loading…
Cancel
Save