summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-12-04 10:11:35 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-12-04 11:51:30 (GMT)
commit3b2a5153a79ec627113223222ed61190bcb3a7e3 (patch)
treef6636f5ef54a444cf5f8ccf0761e0545ea6811cb /Swift/QtUI/QtURLValidator.h
parentfff7ba50011f25fc050329c5db9d0ff8fe11abfa (diff)
downloadswift-contrib-3b2a5153a79ec627113223222ed61190bcb3a7e3.zip
swift-contrib-3b2a5153a79ec627113223222ed61190bcb3a7e3.tar.bz2
Add validation for BOSH URLs in the connection dialog.
Change-Id: I967565abb867279238919f0e5eae6ebe0641d195 Resolves: #1186
Diffstat (limited to 'Swift/QtUI/QtURLValidator.h')
-rw-r--r--Swift/QtUI/QtURLValidator.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/Swift/QtUI/QtURLValidator.h b/Swift/QtUI/QtURLValidator.h
new file mode 100644
index 0000000..fa17253
--- /dev/null
+++ b/Swift/QtUI/QtURLValidator.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2012 Kevin Smith
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include <QValidator>
+
+namespace Swift {
+ class QtURLValidator : public QValidator {
+ Q_OBJECT
+ public:
+ QtURLValidator(QObject* parent);
+ virtual QValidator::State validate(QString& input, int& pos) const;
+ };
+}
+