Changeset View
Changeset View
Standalone View
Standalone View
src/formeditor/connectiondialog.cpp
Context not available. | |||||
31 | #include <KLocalizedString> | 31 | #include <KLocalizedString> | ||
---|---|---|---|---|---|
32 | 32 | | |||
33 | #include <QLabel> | 33 | #include <QLabel> | ||
34 | #include <QRegExp> | 34 | #include <QRegularExpression> | ||
35 | #include <QPushButton> | 35 | #include <QPushButton> | ||
36 | 36 | | |||
37 | using namespace KFormDesigner; | 37 | using namespace KFormDesigner; | ||
Context not available. | |||||
312 | return; | 312 | return; | ||
313 | 313 | | |||
314 | QString signalArg(signal); | 314 | QString signalArg(signal); | ||
315 | signalArg.remove(QRegExp(".*[(]|[)]")); | 315 | signalArg.remove(QRegularExpression(".*[(]|[)]")); | ||
316 | 316 | | |||
317 | const QList<QMetaMethod> list( | 317 | const QList<QMetaMethod> list( | ||
318 | KexiUtils::methodsForMetaObjectWithParents(tree->widget()->metaObject(), | 318 | KexiUtils::methodsForMetaObjectWithParents(tree->widget()->metaObject(), | ||
Context not available. | |||||
320 | foreach(const QMetaMethod &method, list) { | 320 | foreach(const QMetaMethod &method, list) { | ||
321 | // we add the slot only if it is compatible with the signal | 321 | // we add the slot only if it is compatible with the signal | ||
322 | QString slotArg(method.signature()); | 322 | QString slotArg(method.signature()); | ||
323 | slotArg.remove(QRegExp(".*[(]|[)]")); | 323 | slotArg.remove(QRegularExpression(".*[(]|[)]")); | ||
324 | if (!signalArg.startsWith(slotArg, Qt::CaseSensitive) && (!signal.isEmpty())) // args not compatible | 324 | if (!signalArg.startsWith(slotArg, Qt::CaseSensitive) && (!signal.isEmpty())) // args not compatible | ||
325 | continue; | 325 | continue; | ||
326 | 326 | | |||
Context not available. | |||||
364 | 364 | | |||
365 | // Then we check if signal/slot args are compatible | 365 | // Then we check if signal/slot args are compatible | ||
366 | QString signal = (*data)[2].toString(); | 366 | QString signal = (*data)[2].toString(); | ||
367 | signal.remove(QRegExp(".*[(]|[)]")); // just keep the args list | 367 | signal.remove(QRegularExpression(".*[(]|[)]")); // just keep the args list | ||
368 | QString slot = (*data)[4].toString(); | 368 | QString slot = (*data)[4].toString(); | ||
369 | slot.remove(QRegExp(".*[(]|[)]")); | 369 | slot.remove(QRegularExpression(".*[(]|[)]")); | ||
370 | 370 | | |||
371 | if (!signal.startsWith(slot, Qt::CaseSensitive)) { | 371 | if (!signal.startsWith(slot, Qt::CaseSensitive)) { | ||
372 | setStatusError(xi18n("The signal/slot arguments are not compatible."), data); | 372 | setStatusError(xi18n("The signal/slot arguments are not compatible."), data); | ||
Context not available. |