MCPcopy Create free account
hub / github.com/KDE/kdevelop / StashManagerDialog

Method StashManagerDialog

plugins/git/stashmanagerdialog.cpp:28–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26using namespace KDevelop;
27
28StashManagerDialog::StashManagerDialog(const QDir& stashed, GitPlugin* plugin, QWidget* parent)
29 : QDialog(parent), m_plugin(plugin), m_dir(stashed)
30{
31 setWindowTitle(i18nc("@title:window", "Stash Manager"));
32
33 m_ui = new Ui::StashManager;
34 m_ui->setupUi(this);
35
36 KDevelop::restoreAndAutoSaveGeometry(*this, QStringLiteral("VCS"), QStringLiteral("StashManagerDialog"));
37
38 auto* m = new StashModel(stashed, plugin, this);
39 m_ui->stashView->setModel(m);
40
41 connect(m_ui->show, &QPushButton::clicked, this, &StashManagerDialog::showStash);
42 connect(m_ui->apply, &QPushButton::clicked, this, &StashManagerDialog::applyClicked);
43 connect(m_ui->branch, &QPushButton::clicked, this, &StashManagerDialog::branchClicked);
44 connect(m_ui->pop, &QPushButton::clicked, this, &StashManagerDialog::popClicked);
45 connect(m_ui->drop, &QPushButton::clicked, this, &StashManagerDialog::dropClicked);
46 connect(m, &StashModel::rowsInserted, this, &StashManagerDialog::stashesFound);
47
48 connect(m_ui->buttonBox, &QDialogButtonBox::rejected, this, &StashManagerDialog::reject);
49
50 setEnabled(false); //we won't enable it until we have the model with data and selection
51}
52
53StashManagerDialog::~StashManagerDialog()
54{

Callers

nothing calls this directly

Calls 3

setupUiMethod · 0.80
setModelMethod · 0.45

Tested by

no test coverage detected