Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/dialogs/ConfigDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ class RemotesPanel : public QWidget {
connect(dialog, &QDialog::accepted, this,
[this, dialog] { mRepo.addRemote(dialog->name(), dialog->url()); });

dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->open();
}

Expand Down Expand Up @@ -675,21 +676,21 @@ class LfsPanel : public QWidget {
connect(environment, &QAbstractButton::clicked, this, [view] {
git::Repository repo = view->repo();

QDialog *dialog = new QDialog();
dialog->setWindowTitle(tr("git-lfs env (read only)"));
QDialog dialog;
dialog.setWindowTitle(tr("git-lfs env (read only)"));

QSize size(500, 500);
dialog->setFixedSize(size);
dialog.setFixedSize(size);

QTextEdit *textEdit = new QTextEdit(dialog);
QTextEdit *textEdit = new QTextEdit(&dialog);
textEdit->setFixedSize(size);
textEdit->setReadOnly(true);

foreach (const QString &string, repo.lfsEnvironment()) {
textEdit->append(string);
}

dialog->exec();
dialog.exec();
});

QPushButton *deinit = new QPushButton(tr("Deinitialize LFS"));
Expand Down
1 change: 1 addition & 0 deletions src/dialogs/UpdateSubmodulesDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class Model : public QAbstractTableModel {
UpdateSubmodulesDialog::UpdateSubmodulesDialog(const git::Repository &repo,
QWidget *parent)
: QDialog(parent) {
setAttribute(Qt::WA_DeleteOnClose);
mTable = new QTableView(this);
mTable->setShowGrid(false);
mTable->setSelectionMode(QAbstractItemView::NoSelection);
Expand Down
4 changes: 3 additions & 1 deletion src/git/Repository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ Id Repository::workdirId(const QString &path) const {
QString Repository::message() const {
git_buf buf = GIT_BUF_INIT;
git_repository_message(&buf, d->repo);
return QString::fromUtf8(buf.ptr, buf.size);
QString msg = QString::fromUtf8(buf.ptr, buf.size);
git_buf_dispose(&buf);
return msg;
}

// Config file used for git specific configs
Expand Down
5 changes: 2 additions & 3 deletions src/ui/CommitEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ class TextEdit : public QTextEdit {
bool setupSpellCheck(const QString &dictPath, const QString &userDict,
const QTextCharFormat &spellFormat,
const QTextCharFormat &ignoredFormat) {
mSpellChecker = new SpellChecker(dictPath, userDict);
mSpellChecker = std::make_unique<SpellChecker>(dictPath, userDict);
if (!mSpellChecker->isValid()) {
delete mSpellChecker;
mSpellChecker = nullptr;
mSpellList.clear();
setSelections();
Expand Down Expand Up @@ -248,7 +247,7 @@ class TextEdit : public QTextEdit {

QTimer mTimer;

SpellChecker *mSpellChecker = nullptr;
std::unique_ptr<SpellChecker> mSpellChecker = nullptr;
QTextCharFormat mSpellFormat;
QTextCharFormat mIgnoredFormat;
QList<QTextEdit::ExtraSelection> mSpellList;
Expand Down
Loading