[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kaccounts-providers] /: Implemented validatePage
From: Alex Fiestas <afiestas () kde ! org>
Date: 2015-10-15 21:01:18
Message-ID: E1ZmpeI-0000yK-9t () scm ! kde ! org
[Download RAW message or body]
Git commit dab52cb95a632dfc23f1782ac76a9dbe481bdd68 by Alex Fiestas.
Committed on 17/04/2012 at 14:32.
Pushed by mklapetek into branch 'master'.
Implemented validatePage
M +7 -1 basicinfo.cpp
M +1 -0 basicinfo.h
M +1 -1 basicinfo.ui
http://commits.kde.org/kaccounts-providers/dab52cb95a632dfc23f1782ac76a9dbe481bdd68
diff --git a/basicinfo.cpp b/basicinfo.cpp
index 8eb62d2..440af6e 100644
--- a/basicinfo.cpp
+++ b/basicinfo.cpp
@@ -27,6 +27,7 @@
BasicInfo::BasicInfo(OwnCloudWizard* parent)
: QWizardPage(parent)
+ , m_validServer(false)
, m_painter(new KPixmapSequenceOverlayPainter(this))
, m_wizard(parent)
{
@@ -49,7 +50,11 @@ BasicInfo::~BasicInfo()
bool BasicInfo::validatePage()
{
- return true;
+ if (username->text().isEmpty() || password->text().isEmpty()) {
+ return false;
+ }
+
+ return m_validServer;
}
void BasicInfo::checkServer()
@@ -149,6 +154,7 @@ void BasicInfo::setResult(bool result)
icon = "dialog-close";
}
+ m_validServer = result;
setWorking(false);
working->setPixmap(QIcon::fromTheme(icon).pixmap(working->sizeHint()));
}
diff --git a/basicinfo.h b/basicinfo.h
index bec7acd..11aab16 100644
--- a/basicinfo.h
+++ b/basicinfo.h
@@ -54,6 +54,7 @@ class BasicInfo : public QWizardPage, Ui_Owncloud
void setResult(bool result);
private:
+ bool m_validServer;
QByteArray m_json;
KPixmapSequenceOverlayPainter *m_painter;
OwnCloudWizard *m_wizard;
diff --git a/basicinfo.ui b/basicinfo.ui
index 45a6041..8abede9 100644
--- a/basicinfo.ui
+++ b/basicinfo.ui
@@ -83,7 +83,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="QLineEdit" name="email">
+ <widget class="QLineEdit" name="username">
<property name="text">
<string/>
</property>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic