1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-25 19:21:41 +03:00

remove deprecated code

This commit is contained in:
Michail Vourlakos 2017-07-26 15:27:25 +03:00
parent 581af2e6ac
commit cc94677817
2 changed files with 0 additions and 77 deletions

View File

@ -129,16 +129,6 @@ DockCorona::~DockCorona()
disconnect(m_activityConsumer, &KActivities::Consumer::serviceStatusChanged, this, &DockCorona::load);
delete m_activityConsumer;
if (!m_layoutDir.isNull()) {
updateConfigs();
QDir tempLayoutDir(m_layoutDir);
if (tempLayoutDir.exists() && m_layoutDir.startsWith("/tmp")) {
qDebug() << "old layout directory should be deleted... - " << tempLayoutDir.absolutePath();
tempLayoutDir.removeRecursively();
}
}
qDebug() << "latte corona deleted..." << this;
}
@ -187,46 +177,6 @@ void DockCorona::unload()
m_waitingDockViews.clear();
}
bool DockCorona::reloadLayout(QString path)
{
QFile latterc(path + "/lattedockrc");
QFile appletsrc(path + "/lattedock-appletsrc");
if (latterc.exists() && appletsrc.exists()) {
QDir oldLayoutDir(m_layoutDir);
m_layoutDir = path;
unload();
qDebug() << "reloadLayout: loading new layout - " << appletsrc.fileName();
m_screenPool->reload(m_layoutDir);
loadLayout(appletsrc.fileName());
m_tasksWillBeLoaded = heuresticForLoadingDockWithTasks();
qDebug() << "TASKS WILL BE PRESENT AFTER LOADING ::: " << m_tasksWillBeLoaded;
foreach (auto containment, containments())
addDock(containment);
if (oldLayoutDir.exists() && oldLayoutDir.absolutePath().startsWith("/tmp")
&& oldLayoutDir.absolutePath() != path) {
qDebug() << "old layout directory should be deleted... - " << oldLayoutDir.absolutePath();
oldLayoutDir.removeRecursively();
}
QTimer::singleShot(2000, [this]() {
qDebug() << "reload: starting delayed update config files...";
updateConfigs();
});
return true;
}
return false;
}
void DockCorona::loadLatteLayout(QString layoutPath)
{
if (!layoutPath.isEmpty()) {
@ -240,29 +190,6 @@ void DockCorona::loadLatteLayout(QString layoutPath)
}
}
void DockCorona::updateConfigs()
{
if (!m_layoutDir.isNull()) {
qDebug() << "layout directory found:" << m_layoutDir;
QFile latterc(m_layoutDir + "/lattedockrc");
QFile appletsrc(m_layoutDir + "/lattedock-appletsrc");
if (latterc.exists() && appletsrc.exists()) {
qDebug() << "updating latte layout...";
const auto homeLatterc = QDir::homePath() + "/.config/lattedockrc";
const auto homeAppletsrc = QDir::homePath() + "/.config/lattedock-appletsrc";
if (QFile::remove(homeLatterc) && QFile::remove(homeAppletsrc)) {
QFile::copy(latterc.fileName() , homeLatterc);
QFile::copy(appletsrc.fileName() , homeAppletsrc);
}
}
}
}
void DockCorona::setupWaylandIntegration()
{
using namespace KWayland::Client;

View File

@ -72,7 +72,6 @@ public:
QList<Plasma::Types::Location> freeEdges(QScreen *screen) const;
void loadLatteLayout(QString layoutPath);
bool reloadLayout(QString path);
int docksCount() const;
int docksCount(int screen) const;
@ -112,7 +111,6 @@ private slots:
void showAlternativesForApplet(Plasma::Applet *applet);
void alternativesVisibilityChanged(bool visible);
void load();
void updateConfigs();
void addOutput(QScreen *screen);
void primaryOutputChanged();
@ -143,8 +141,6 @@ private:
//! with tasks" will be loaded otherwise. Currently the older one dock wins
int m_firstContainmentWithTasks{ -1};
QString m_layoutDir;
QHash<const Plasma::Containment *, DockView *> m_dockViews;
QHash<const Plasma::Containment *, DockView *> m_waitingDockViews;
QList<KDeclarative::QmlObject *> m_alternativesObjects;