Manually prevent clang-format formatting

The result would be too disruptive
wilder-5.22
Nicolas Fella 5 years ago committed by Alexander Lohnau
parent c2e322a4b8
commit 69b7aec0de
  1. 3
      applets/kicker/plugin/dashboardwindow.cpp
  2. 8
      applets/kicker/plugin/kastatsfavoritesmodel.cpp
  3. 3
      dataengines/time/solarsystem.cpp
  4. 2
      kcms/kfontinst/kcmfontinst/KCmFontInst.cpp
  5. 3
      kcms/kfontinst/viewpart/UnicodeScripts.h

@ -168,6 +168,7 @@ void DashboardWindow::keyPressEvent(QKeyEvent *e)
emit keyEscapePressed();
return;
// clang-format off
} else if (m_keyEventProxy && !m_keyEventProxy->hasActiveFocus()
&& !(e->key() == Qt::Key_Home)
&& !(e->key() == Qt::Key_End)
@ -182,7 +183,7 @@ void DashboardWindow::keyPressEvent(QKeyEvent *e)
&& !(e->key() == Qt::Key_Menu)
&& !(e->key() == Qt::Key_Tab)
&& !(e->key() == Qt::Key_Backtab)) {
// clang-format on
QPointer<QQuickItem> previousFocusItem = activeFocusItem();
m_keyEventProxy->forceActiveFocus();

@ -50,6 +50,7 @@ using namespace KAStats::Terms;
QString agentForUrl(const QString &url)
{
// clang-format off
return url.startsWith(QLatin1String("ktp:"))
? AGENT_CONTACTS
: url.startsWith(QLatin1String("preferred:"))
@ -62,6 +63,7 @@ QString agentForUrl(const QString &url)
? AGENT_DOCUMENTS
// use applications as the default
: AGENT_APPLICATIONS;
// clang-format on
}
class KAStatsFavoritesModel::Private: public QAbstractListModel {
@ -244,7 +246,7 @@ public:
[&] (const NormalizedId &left, const NormalizedId &right) {
auto leftIndex = ordering.indexOf(left.value());
auto rightIndex = ordering.indexOf(right.value());
// clang-format off
return (leftIndex == -1 && rightIndex == -1) ?
left.value() < right.value() :
@ -256,6 +258,7 @@ public:
// otherwise
leftIndex < rightIndex;
// clang-format on
});
// Debugging:
@ -360,7 +363,7 @@ public:
const auto index = item.row();
const auto entry = m_itemEntries[m_items[index].value()];
// clang-format off
return entry == nullptr ? QVariant()
: role == Qt::DisplayRole ? entry->name()
: role == Qt::DecorationRole ? entry->icon()
@ -370,6 +373,7 @@ public:
: role == Kicker::HasActionListRole ? entry->hasActions()
: role == Kicker::ActionListRole ? entry->actions()
: QVariant();
// clang-format on
}
bool trigger(int row, const QString &actionId, const QVariant &argument)

@ -83,7 +83,7 @@ bool Moon::calcPerturbations(double *lo, double *la, double *r)
double Ms = m_sun->meanAnomaly();
double D = L - m_sun->meanLongitude();
double F = L - N;
// clang-format off
*lo += -1.274 * sind(M - 2 * D)
+0.658 * sind(2 * D)
-0.186 * sind(Ms)
@ -103,6 +103,7 @@ bool Moon::calcPerturbations(double *lo, double *la, double *r)
+0.017 * sind(2 * M + F);
*r += -0.58 * cosd(M - 2 * D)
-0.46 * cosd(2 * D);
// clang-format on
return true;
}

@ -1179,6 +1179,7 @@ void CKCmFontInst::toggleFonts(CJobRunner::ItemList &urls, const QStringList &fo
case 0:
break;
case 1:
// clang-format off
doIt = KMessageBox::Continue==KMessageBox::warningContinueCancel(this,
grp.isEmpty()
? enable ? i18n("<p>Do you really want to "
@ -1220,6 +1221,7 @@ void CKCmFontInst::toggleFonts(CJobRunner::ItemList &urls, const QStringList &fo
enable ? i18n("Enable Fonts") : i18n("Disable Fonts"),
enable ? KGuiItem(i18n("Enable"), "font-enable", i18n("Enable Fonts"))
: KGuiItem(i18n("Disable"), "font-disable", i18n("Disable Fonts")));
// clang-format on
}
if(doIt)

@ -9,6 +9,7 @@
#include <QtGlobal>
#include <KLocalizedString>
// clang-format off
static const char * const constUnicodeScriptList[] =
{
I18N_NOOP("Arabic"),
@ -1281,6 +1282,6 @@ static const TUnicodeScript constUnicodeScripts[] =
{ 0xE0100, 0xE01EF, 29 },
{ 0x0, 0x0, -1 }
};
// clang-format on
#endif

Loading…
Cancel
Save