mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-29 20:27:49 +02:00
qt: fixes #1180
This commit is contained in:
parent
d3bf8c2417
commit
ccc604c0f4
9 changed files with 161 additions and 59 deletions
12
qt/i2pd_qt/I2pdQtUtil.cpp
Normal file
12
qt/i2pd_qt/I2pdQtUtil.cpp
Normal file
|
@ -0,0 +1,12 @@
|
|||
#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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue