Restore correct formatting
Many lines were not conformant with the project's formatting rules. This patch should fix all formatting and whitespace issues in the code base. A clang-format directive was put around the connect() calls containing SIGNALs and SLOTs whose signatures would be denormalized because of the formatting rules.
This commit is contained in:
committed by
Jonathan White
parent
f9625189cb
commit
fc930bae69
@@ -672,7 +672,7 @@ bool AutoType::checkSyntax(const QString& string)
|
||||
QString shortcutKeys = "[\\^\\%~\\+@]";
|
||||
// a normal string not in parentheses
|
||||
QString fixedStrings = "[^\\^\\%~\\+@\\{\\}]*";
|
||||
|
||||
// clang-format off
|
||||
QRegularExpression autoTypeSyntax(
|
||||
"^(?:" + shortcutKeys + "|" + fixedStrings + "|\\{(?:" + normalCommands + "|" + specialLiterals + "|"
|
||||
+ functionKeys
|
||||
@@ -688,6 +688,7 @@ bool AutoType::checkSyntax(const QString& string)
|
||||
+ customAttributes
|
||||
+ "\\})*$",
|
||||
QRegularExpression::CaseInsensitiveOption);
|
||||
// clang-format on
|
||||
QRegularExpressionMatch match = autoTypeSyntax.match(string);
|
||||
return match.hasMatch();
|
||||
}
|
||||
@@ -755,9 +756,10 @@ bool AutoType::verifyAutoTypeSyntax(const QString& sequence)
|
||||
}
|
||||
} else if (AutoType::checkHighRepetition(sequence)) {
|
||||
QMessageBox::StandardButton reply;
|
||||
reply =
|
||||
QMessageBox::question(nullptr, tr("Auto-Type"), tr("This Auto-Type command contains arguments which are "
|
||||
"repeated very often. Do you really want to proceed?"));
|
||||
reply = QMessageBox::question(nullptr,
|
||||
tr("Auto-Type"),
|
||||
tr("This Auto-Type command contains arguments which are "
|
||||
"repeated very often. Do you really want to proceed?"));
|
||||
|
||||
if (reply == QMessageBox::No) {
|
||||
return false;
|
||||
|
||||
@@ -67,10 +67,13 @@ AutoTypeSelectDialog::AutoTypeSelectDialog(QWidget* parent)
|
||||
QLabel* descriptionLabel = new QLabel(tr("Select entry to Auto-Type:"), this);
|
||||
layout->addWidget(descriptionLabel);
|
||||
|
||||
// clang-format off
|
||||
connect(m_view, SIGNAL(activated(QModelIndex)), SLOT(emitMatchActivated(QModelIndex)));
|
||||
connect(m_view, SIGNAL(clicked(QModelIndex)), SLOT(emitMatchActivated(QModelIndex)));
|
||||
connect(m_view->model(), SIGNAL(rowsRemoved(QModelIndex,int,int)), SLOT(matchRemoved()));
|
||||
connect(m_view, SIGNAL(rejected()), SLOT(reject()));
|
||||
// clang-format on
|
||||
|
||||
layout->addWidget(m_view);
|
||||
|
||||
QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel, Qt::Horizontal, this);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
const QChar WildcardMatcher::Wildcard = '*';
|
||||
const Qt::CaseSensitivity WildcardMatcher::Sensitivity = Qt::CaseInsensitive;
|
||||
|
||||
WildcardMatcher::WildcardMatcher(QString text)
|
||||
WildcardMatcher::WildcardMatcher(QString text)
|
||||
: m_text(std::move(text))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
class WildcardMatcher
|
||||
{
|
||||
public:
|
||||
explicit WildcardMatcher(QString text);
|
||||
explicit WildcardMatcher(QString text);
|
||||
bool match(const QString& pattern);
|
||||
|
||||
static const QChar Wildcard;
|
||||
|
||||
@@ -211,8 +211,7 @@ int AutoTypePlatformX11::platformEventFilter(void* event)
|
||||
xcb_key_press_event_t* keyPressEvent = static_cast<xcb_key_press_event_t*>(event);
|
||||
if (keyPressEvent->detail == m_currentGlobalKeycode
|
||||
&& (keyPressEvent->state & m_modifierMask) == m_currentGlobalNativeModifiers
|
||||
&& (!QApplication::activeWindow() || QApplication::activeWindow()->isMinimized())
|
||||
&& m_loaded) {
|
||||
&& (!QApplication::activeWindow() || QApplication::activeWindow()->isMinimized()) && m_loaded) {
|
||||
if (type == XCB_KEY_PRESS) {
|
||||
emit globalShortcutTriggered();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user