remove deprecated code

pull/1/head
Michail Vourlakos 8 years ago
parent 2d4aeaaf51
commit aed9452330

@ -38,13 +38,6 @@ LayoutManager::LayoutManager(QObject *parent)
m_corona = qobject_cast<DockCorona *>(parent);
if (m_corona) {
//! create the alternative session action
const QIcon toggleIcon = QIcon::fromTheme("user-identity");
m_toggleLayoutAction = new QAction(toggleIcon, i18n("Alternative Layout"), this);
m_toggleLayoutAction->setStatusTip(i18n("Enable/Disable Alternative Layout"));
m_toggleLayoutAction->setCheckable(true);
connect(m_toggleLayoutAction, &QAction::triggered, this, &LayoutManager::toggleLayout);
//! create the add widgets action
const QIcon addWidIcon = QIcon::fromTheme("add");
m_addWidgetsAction = new QAction(addWidIcon, i18n("Add Widgets..."), this);
@ -62,7 +55,6 @@ LayoutManager::LayoutManager(QObject *parent)
LayoutManager::~LayoutManager()
{
m_importer->deleteLater();
m_toggleLayoutAction->deleteLater();
if (m_currentLayout) {
m_currentLayout->deleteLater();
@ -110,11 +102,6 @@ Importer *LayoutManager::importer()
return m_importer;
}
QAction *LayoutManager::toggleLayoutAction()
{
return m_toggleLayoutAction;
}
QAction *LayoutManager::addWidgetsAction()
{
return m_addWidgetsAction;
@ -226,15 +213,6 @@ void LayoutManager::confirmDynamicSwitch()
}
}
void LayoutManager::toggleLayout()
{
if (m_corona->universalSettings()->currentLayoutName() == i18n("Alternative")) {
switchToLayout(m_lastNonAlternativeLayout);
} else {
switchToLayout(i18n("Alternative"));
}
}
void LayoutManager::loadLayouts()
{
m_layouts.clear();
@ -308,13 +286,6 @@ bool LayoutManager::switchToLayout(QString layoutName)
m_currentLayout = new LayoutSettings(this, lPath, layoutName);
emit currentLayoutChanged();
if (layoutName != i18n("Alternative")) {
m_toggleLayoutAction->setChecked(false);
m_lastNonAlternativeLayout = layoutName;
} else {
m_toggleLayoutAction->setChecked(true);
}
});
}

@ -47,7 +47,6 @@ class LayoutManager : public QObject {
Q_PROPERTY(QStringList layouts READ layouts NOTIFY layoutsChanged)
Q_PROPERTY(QStringList menuLayouts READ menuLayouts NOTIFY menuLayoutsChanged)
Q_PROPERTY(QAction *toggleLayoutAction READ toggleLayoutAction NOTIFY toggleLayoutActionChanged)
Q_PROPERTY(QAction *addWidgetsAction READ addWidgetsAction NOTIFY addWidgetsActionChanged)
Q_PROPERTY(LayoutSettings *currentLayout READ currentLayout NOTIFY currentLayoutChanged)
@ -70,7 +69,6 @@ public:
QStringList presetsPaths() const;
QAction *addWidgetsAction();
QAction *toggleLayoutAction();
LayoutSettings *currentLayout();
@ -93,7 +91,6 @@ signals:
void currentLayoutNameChanged();
void layoutsChanged();
void menuLayoutsChanged();
void toggleLayoutActionChanged();
private slots:
void currentActivityChanged(const QString &id);
@ -106,8 +103,6 @@ private:
QString layoutPath(QString layoutName);
void loadLayouts();
//! it is used to activate / deactivate the Alternative Layout
void toggleLayout();
private:
DockCorona *m_corona{nullptr};
@ -115,7 +110,6 @@ private:
LayoutSettings *m_currentLayout{nullptr};
QString m_lastNonAlternativeLayout{QString(i18n("My Layout"))};
QString m_shouldSwitchToLayout;
bool layoutIsAssigned(QString layoutName);
@ -126,7 +120,6 @@ private:
QStringList m_presetsPaths;
QAction *m_addWidgetsAction{nullptr};
QAction *m_toggleLayoutAction{nullptr};
QPointer<LayoutConfigDialog> m_layoutConfigDialog;

Loading…
Cancel
Save