Commit 8d24766c authored by Tomaz  Canabrava's avatar Tomaz Canabrava Committed by Tomaz Canabrava
Browse files

Auto expand plugin folders when first opening

parent fa389c37
Pipeline #242219 passed with stage
in 5 minutes and 47 seconds
......@@ -15,6 +15,9 @@
#include <QStandardPaths>
#include <QTemporaryFile>
#include <QTimer>
#include <QShowEvent>
#include <kmessagebox.h>
#include <kstandardguiitem.h>
......@@ -23,6 +26,7 @@ struct QuickCommandsWidget::Private {
FilterModel *filterModel = nullptr;
Konsole::SessionController *controller = nullptr;
bool hasShellCheck = false;
bool isSetup = false;
QTimer shellCheckTimer;
};
......@@ -307,3 +311,11 @@ void QuickCommandsWidget::runShellCheck()
ui->tabWidget->setTabText(1, i18n("Warnings (*)"));
}
}
void QuickCommandsWidget::showEvent(QShowEvent *)
{
if (!priv->isSetup) {
ui->commandsTreeView->expandAll();
priv->isSetup = true;
}
}
......@@ -54,6 +54,9 @@ public:
void setModel(QuickCommandsModel *model);
void setCurrentController(Konsole::SessionController *controller);
protected:
void showEvent(QShowEvent *) override;
private:
QuickCommandData data() const;
void prepareEdit();
......
......@@ -38,6 +38,7 @@ struct SSHManagerTreeWidget::Private {
SSHManagerModel *model = nullptr;
SSHManagerFilterModel *filterModel = nullptr;
Konsole::SessionController *controller = nullptr;
bool isSetup = false;
};
SSHManagerTreeWidget::SSHManagerTreeWidget(QWidget *parent)
......@@ -502,3 +503,11 @@ void SSHManagerTreeWidget::connectRequested(const QModelIndex &idx)
d->controller->session()->views().at(0)->setFocus();
}
}
void SSHManagerTreeWidget::showEvent(QShowEvent *)
{
if (!d->isSetup) {
ui->treeView->expandAll();
d->isSetup = true;
}
}
......@@ -64,6 +64,9 @@ public:
void connectRequested(const QModelIndex &idx);
void handleImportedData(bool isImported);
protected:
void showEvent(QShowEvent *) override;
private:
void updateProfileList();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment