mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-16 00:12:43 +00:00
13 lines
443 B
C++
13 lines
443 B
C++
#include "I2pdQtUtil.h"
|
|
|
|
bool isValidSingleLine(QLineEdit* widget, WrongInputPageEnum inputPage, MainWindow* mainWindow) {
|
|
bool correct = !widget->text().contains(QRegularExpression("[\r\n]"), nullptr);
|
|
if(!correct) {
|
|
mainWindow->highlightWrongInput(
|
|
QApplication::tr("Single line input expected, but it's multiline"),
|
|
inputPage,
|
|
widget);
|
|
}
|
|
return correct;
|
|
}
|