# HG changeset patch # User Chris Cannam # Date 1544016069 0 # Node ID 4283398d248f0184df7a2ac3d76e900b44bbf1d3 # Parent e4d18e8ef4305a5fde08f3b96799bb3e9e027510 Minor improvement to dialog spacing diff -r e4d18e8ef430 -r 4283398d248f src/hgrunner.cpp --- a/src/hgrunner.cpp Wed Dec 05 13:20:51 2018 +0000 +++ b/src/hgrunner.cpp Wed Dec 05 13:21:09 2018 +0000 @@ -484,7 +484,7 @@ QByteArray fileExt = randomKey(); if (fileExt == QByteArray()) { - DEBUG << "HgRunner::addExtensionOptions: Failed to get proper auth file ext" << endl; + DEBUG << "HgRunner::getAuthFilePath: Failed to get proper auth file ext" << endl; return ""; } QString fileExt16 = QString::fromLocal8Bit(fileExt.toBase64()).left(16) @@ -493,7 +493,7 @@ (QStandardPaths::CacheLocation); QDir().mkpath(path); if (path == "") { - DEBUG << "HgRunner::addExtensionOptions: Failed to get cache location" << endl; + DEBUG << "HgRunner::getAuthFilePath: Failed to get cache location" << endl; return ""; } @@ -509,7 +509,7 @@ if (m_authKey == "") { QByteArray key = randomKey(); if (key == QByteArray()) { - DEBUG << "HgRunner::addExtensionOptions: Failed to get proper auth key" << endl; + DEBUG << "HgRunner::getAuthKey: Failed to get proper auth key" << endl; return ""; } QString key16 = QString::fromLocal8Bit(key.toBase64()).left(16); diff -r e4d18e8ef430 -r 4283398d248f src/moreinformationdialog.cpp --- a/src/moreinformationdialog.cpp Wed Dec 05 13:20:51 2018 +0000 +++ b/src/moreinformationdialog.cpp Wed Dec 05 13:21:09 2018 +0000 @@ -35,24 +35,24 @@ { setWindowTitle(title); - QGridLayout *layout = new QGridLayout; - layout->setSpacing(10); - setLayout(layout); + m_layout = new QGridLayout; + m_layout->setSpacing(10); + setLayout(m_layout); m_iconLabel = new QLabel; - layout->addWidget(m_iconLabel, 0, 0, 2, 1, Qt::AlignTop); + m_layout->addWidget(m_iconLabel, 0, 0, 2, 1, Qt::AlignTop); QLabel *headLabel = new QLabel(QString("

%1

").arg(head)); - layout->addWidget(headLabel, 0, 1); + m_layout->addWidget(headLabel, 0, 1); QLabel *textLabel = new QLabel(text); textLabel->setTextFormat(Qt::RichText); textLabel->setWordWrap(true); - layout->addWidget(textLabel, 1, 1, Qt::AlignTop); + m_layout->addWidget(textLabel, 1, 1, Qt::AlignTop); QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Ok); connect(bb, SIGNAL(accepted()), this, SLOT(accept())); - layout->addWidget(bb, 2, 0, 1, 2); + m_layout->addWidget(bb, 2, 0, 1, 2); m_moreButton = bb->addButton(tr("More Details..."), QDialogButtonBox::ActionRole); @@ -74,13 +74,13 @@ font.setStyleHint(QFont::TypeWriter); m_moreText->setFont(font); - layout->addWidget(m_moreText, 3, 0, 1, 2); + m_layout->addWidget(m_moreText, 3, 0, 1, 2); m_moreText->hide(); if (more == "") m_moreButton->hide(); - layout->setRowStretch(1, 10); - layout->setColumnStretch(1, 20); + m_layout->setRowStretch(1, 10); + m_layout->setColumnStretch(1, 20); setMinimumWidth(400); } @@ -93,9 +93,11 @@ { if (m_moreText->isVisible()) { m_moreText->hide(); + m_layout->setRowStretch(3, 0); m_moreButton->setText(tr("Show Details...")); } else { m_moreText->show(); + m_layout->setRowStretch(3, 30); m_moreButton->setText(tr("Hide Details...")); } adjustSize(); diff -r e4d18e8ef430 -r 4283398d248f src/moreinformationdialog.h --- a/src/moreinformationdialog.h Wed Dec 05 13:20:51 2018 +0000 +++ b/src/moreinformationdialog.h Wed Dec 05 13:21:09 2018 +0000 @@ -24,6 +24,7 @@ class QLabel; class QTextEdit; class QPushButton; +class QGridLayout; /** * Provide methods like the QMessageBox static methods, to call up @@ -55,6 +56,7 @@ void moreClicked(); private: + QGridLayout *m_layout; QLabel *m_iconLabel; QPushButton *m_moreButton; QTextEdit *m_moreText;