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

Method disableSourceFormatting

kdevplatform/shell/sourceformattercontroller.cpp:926–948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

924}
925
926void SourceFormatterController::disableSourceFormatting()
927{
928 Q_D(SourceFormatterController);
929
930 d->enabled = false;
931
932 if (d->sourceFormatters.empty()) {
933 return;
934 }
935
936 decltype(d->sourceFormatters) loadedFormatters{};
937 d->sourceFormatters.swap(loadedFormatters);
938
939 resetUi();
940
941 for (auto* formatter : std::as_const(loadedFormatters)) {
942 emit formatterUnloading(formatter);
943 }
944
945 Q_ASSERT(!loadedFormatters.empty());
946 Q_ASSERT(d->sourceFormatters.empty());
947 emit hasFormattersChanged(false);
948}
949
950bool SourceFormatterController::sourceFormattingEnabled()
951{

Callers 1

initTestCaseMethod · 0.80

Calls 2

emptyMethod · 0.80
swapMethod · 0.45

Tested by 1

initTestCaseMethod · 0.64