Commit Dialog:
- Commit messages must not be empty - Double-clicking a file invokes diff FileAction Dialog: - Optional checkbox MainWindow: - Added Rename/Undo/About Actions - Added Renamed/Missing file states - Added tooltips to status column - Support for running fossil in detached mode (to prevent killing fossil due to timeout on diff sessions) FossilOrigin-Name: ea42e7cd8b7041d82e35720b14e30437b6db6e0d
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
#include "CommitDialog.h"
|
||||
#include <QPushButton>
|
||||
#include "ui_CommitDialog.h"
|
||||
#include "MainWindow.h" // Ugly. I know.
|
||||
|
||||
CommitDialog::CommitDialog(const QStringList &commitMsgHistory, const QStringList &files, QWidget *parent) :
|
||||
CommitDialog::CommitDialog(QWidget *parent, const QStringList &commitMsgHistory, const QStringList &files) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::CommitDialog)
|
||||
{
|
||||
@ -16,14 +18,16 @@ CommitDialog::CommitDialog(const QStringList &commitMsgHistory, const QStringLis
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
CommitDialog::~CommitDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
bool CommitDialog::run(QString &commitMsg, const QStringList &commitMsgHistory, const QStringList &files, QWidget *parent)
|
||||
//------------------------------------------------------------------------------
|
||||
bool CommitDialog::run(QWidget *parent, QString &commitMsg, const QStringList &commitMsgHistory, const QStringList &files)
|
||||
{
|
||||
CommitDialog dlg(commitMsgHistory, files, parent);
|
||||
CommitDialog dlg(parent, commitMsgHistory, files);
|
||||
int res = dlg.exec();
|
||||
if(res==QDialog::Accepted)
|
||||
{
|
||||
@ -34,7 +38,22 @@ bool CommitDialog::run(QString &commitMsg, const QStringList &commitMsgHistory,
|
||||
return false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void CommitDialog::on_comboBox_activated(const QString &arg1)
|
||||
{
|
||||
ui->plainTextEdit->setPlainText(arg1);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void CommitDialog::on_plainTextEdit_textChanged()
|
||||
{
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!ui->plainTextEdit->toPlainText().isEmpty());
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void CommitDialog::on_listView_doubleClicked(const QModelIndex &index)
|
||||
{
|
||||
QVariant data = itemModel.data(index);
|
||||
QString filename = data.toString();
|
||||
reinterpret_cast<MainWindow*>(parent())->diffFile(filename);
|
||||
}
|
||||
|
Reference in New Issue
Block a user