Show UI warning for invalid URLs

This commit is contained in:
varjolintu
2019-11-22 13:54:28 +02:00
committed by Jonathan White
parent 663393d994
commit c0f29cc790
11 changed files with 211 additions and 2 deletions

43
src/gui/URLEdit.h Normal file
View File

@@ -0,0 +1,43 @@
/*
* Copyright (C) 2014 Felix Geyer <debfx@fobos.de>
* Copyright (C) 2019 KeePassXC Team <team@keepassxc.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 or (at your option)
* version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEEPASSX_URLEDIT_H
#define KEEPASSX_URLEDIT_H
#include <QAction>
#include <QLineEdit>
#include <QPointer>
class URLEdit : public QLineEdit
{
Q_OBJECT
public:
static const QColor ErrorColor;
explicit URLEdit(QWidget* parent = nullptr);
void enableVerifyMode();
private slots:
void updateStylesheet();
private:
QPointer<QAction> m_errorAction;
};
#endif // KEEPASSX_URLEDIT_H