Commit a5ca3cd1 authored by René J.V. Bertin's avatar René J.V. Bertin

polish Purpose integration in the PatchReview plugin

Sets appropriate initial values to the "Export" model parameters "urls"
and "mimeType" to avoid startup warnings. Also sets the updateComment of
the Phabricator plugin so that the default upgrade summary is a little
more personal.

Differential Revision: https://phabricator.kde.org/D17424
parent 51b62ee6
......@@ -138,7 +138,8 @@ void PatchReviewToolView::patchChanged() {
m_exportMenu->model()->setInputData(QJsonObject {
{ QStringLiteral("urls"), QJsonArray { p->file().toString() } },
{ QStringLiteral("mimeType"), { QStringLiteral("text/x-patch") } },
{ QStringLiteral("localBaseDir"), { p->baseDir().toString() } }
{ QStringLiteral("localBaseDir"), { p->baseDir().toString() } },
{ QStringLiteral("updateComment"), { i18n("patch updated through KDevelop's patchreview plugin") } }
});
}
#endif
......@@ -228,6 +229,11 @@ void PatchReviewToolView::showEditDialog() {
QMessageBox::warning(nullptr, i18n("Error exporting"), i18n("Couldn't export the patch.\n%1", message));
}
});
// set the model input parameters to avoid terminal warnings
m_exportMenu->model()->setInputData(QJsonObject {
{ QStringLiteral("urls"), QJsonArray { QString() } },
{ QStringLiteral("mimeType"), { QStringLiteral("text/x-patch") } }
});
m_exportMenu->model()->setPluginType(QStringLiteral("Export"));
m_editPatch.exportReview->setMenu( m_exportMenu );
#else
......
Markdown is supported
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