MCPcopy Create free account
hub / github.com/KDE/kdevelop / setPatch

Method setPatch

plugins/patchreview/patchreview.cpp:483–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483void PatchReviewPlugin::setPatch( IPatchSource* patch ) {
484 if ( patch == m_patch ) {
485 return;
486 }
487
488 if( m_patch ) {
489 disconnect( m_patch.data(), &IPatchSource::patchChanged, this, &PatchReviewPlugin::notifyPatchChanged );
490 m_patch->deleteLater();
491 }
492 m_patch = patch;
493
494 if( m_patch ) {
495 qCDebug(PLUGIN_PATCHREVIEW) << "setting new patch" << patch->name() << "with file" << patch->file() << "basedir" << patch->baseDir();
496
497 connect( m_patch.data(), &IPatchSource::patchChanged, this, &PatchReviewPlugin::notifyPatchChanged );
498 }
499 QString finishText = i18nc("@action", "Finish Review");
500 if( m_patch && !m_patch->finishReviewCustomText().isEmpty() )
501 finishText = m_patch->finishReviewCustomText();
502 m_finishReview->setText( finishText );
503 m_finishReview->setEnabled( patch );
504
505 notifyPatchChanged();
506}
507
508PatchReviewPlugin::PatchReviewPlugin(QObject* parent, const KPluginMetaData& metaData, const QVariantList&)
509 : KDevelop::IPlugin(QStringLiteral("kdevpatchreview"), parent, metaData)

Callers

nothing calls this directly

Calls 8

dataMethod · 0.45
nameMethod · 0.45
fileMethod · 0.45
baseDirMethod · 0.45
isEmptyMethod · 0.45
setTextMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected