Changeset View
Changeset View
Standalone View
Standalone View
plugins/patchreview/patchreviewtoolview.cpp
Show First 20 Lines • Show All 120 Lines • ▼ Show 20 Line(s) | |||||
121 | } | 121 | } | ||
122 | 122 | | |||
123 | void PatchReviewToolView::startingNewReview() | 123 | void PatchReviewToolView::startingNewReview() | ||
124 | { | 124 | { | ||
125 | m_resetCheckedUrls = true; | 125 | m_resetCheckedUrls = true; | ||
126 | } | 126 | } | ||
127 | 127 | | |||
128 | void PatchReviewToolView::patchChanged() { | 128 | void PatchReviewToolView::patchChanged() { | ||
129 | if(m_resetCheckedUrls) { | ||||
130 | // set the default number of context lines | ||||
131 | m_editPatch.diffContext->setValue(3); | ||||
132 | } | ||||
133 | | ||||
129 | fillEditFromPatch(); | 134 | fillEditFromPatch(); | ||
130 | kompareModelChanged(); | 135 | kompareModelChanged(); | ||
131 | 136 | | |||
132 | #ifdef WITH_PURPOSE | 137 | #ifdef WITH_PURPOSE | ||
133 | IPatchSource::Ptr p = m_plugin->patch(); | 138 | IPatchSource::Ptr p = m_plugin->patch(); | ||
134 | if (p) { | 139 | if (p) { | ||
135 | m_exportMenu->model()->setInputData(QJsonObject { | 140 | m_exportMenu->model()->setInputData(QJsonObject { | ||
136 | { QStringLiteral("urls"), QJsonArray { p->file().toString() } }, | 141 | { QStringLiteral("urls"), QJsonArray { p->file().toString() } }, | ||
▲ Show 20 Lines • Show All 109 Lines • ▼ Show 20 Line(s) | 245 | #endif | |||
246 | connect( m_editPatch.filesList, &QTreeView::activated , this, &PatchReviewToolView::fileDoubleClicked ); | 251 | connect( m_editPatch.filesList, &QTreeView::activated , this, &PatchReviewToolView::fileDoubleClicked ); | ||
247 | 252 | | |||
248 | connect( m_editPatch.cancelReview, &QPushButton::clicked, m_plugin, &PatchReviewPlugin::cancelReview ); | 253 | connect( m_editPatch.cancelReview, &QPushButton::clicked, m_plugin, &PatchReviewPlugin::cancelReview ); | ||
249 | //connect( m_editPatch.cancelButton, SIGNAL(pressed()), this, SLOT(slotEditCancel()) ); | 254 | //connect( m_editPatch.cancelButton, SIGNAL(pressed()), this, SLOT(slotEditCancel()) ); | ||
250 | 255 | | |||
251 | //connect( this, SIGNAL(finished(int)), this, SLOT(slotEditDialogFinished(int)) ); | 256 | //connect( this, SIGNAL(finished(int)), this, SLOT(slotEditDialogFinished(int)) ); | ||
252 | 257 | | |||
253 | connect( m_editPatch.updateButton, &QPushButton::clicked, m_plugin, &PatchReviewPlugin::forceUpdate ); | 258 | connect( m_editPatch.updateButton, &QPushButton::clicked, m_plugin, &PatchReviewPlugin::forceUpdate ); | ||
259 | connect( m_editPatch.diffContext, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged), | ||||
260 | m_plugin, &PatchReviewPlugin::forceUpdateWithContext ); | ||||
254 | 261 | | |||
255 | connect( m_editPatch.testsButton, &QPushButton::clicked, this, &PatchReviewToolView::runTests ); | 262 | connect( m_editPatch.testsButton, &QPushButton::clicked, this, &PatchReviewToolView::runTests ); | ||
256 | 263 | | |||
257 | m_selectAllAction = new QAction(QIcon::fromTheme(QStringLiteral("edit-select-all")), i18n("Select All"), this ); | 264 | m_selectAllAction = new QAction(QIcon::fromTheme(QStringLiteral("edit-select-all")), i18n("Select All"), this ); | ||
258 | connect( m_selectAllAction, &QAction::triggered, this, &PatchReviewToolView::selectAll ); | 265 | connect( m_selectAllAction, &QAction::triggered, this, &PatchReviewToolView::selectAll ); | ||
259 | m_deselectAllAction = new QAction( i18n("Deselect All"), this ); | 266 | m_deselectAllAction = new QAction( i18n("Deselect All"), this ); | ||
260 | connect( m_deselectAllAction, &QAction::triggered, this, &PatchReviewToolView::deselectAll ); | 267 | connect( m_deselectAllAction, &QAction::triggered, this, &PatchReviewToolView::deselectAll ); | ||
261 | } | 268 | } | ||
▲ Show 20 Lines • Show All 341 Lines • Show Last 20 Lines |