Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
076e0edf
Commit
076e0edf
authored
Sep 25, 2012
by
Guillaume Burel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Implemented SANKORE-765."
This reverts commit
90c03c86
.
parent
90c03c86
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
106 deletions
+6
-106
UBDocumentPublisher.cpp
src/adaptors/publishing/UBDocumentPublisher.cpp
+6
-77
UBDocumentPublisher.h
src/adaptors/publishing/UBDocumentPublisher.h
+0
-29
No files found.
src/adaptors/publishing/UBDocumentPublisher.cpp
View file @
076e0edf
...
...
@@ -77,19 +77,15 @@ void UBDocumentPublisher::publish()
//check that the username and password are stored on preferences
UBSettings
*
settings
=
UBSettings
::
settings
();
if
(
settings
->
communityUsername
().
isEmpty
()
||
settings
->
communityPassword
().
isEmpty
()){
UBApplication
::
showMessage
(
tr
(
"Credentials has to not been filled out yet."
));
qDebug
()
<<
"trying to connect to community without the required credentials"
;
return
;
}
mUsername
=
settings
->
communityUsername
();
mPassword
=
settings
->
communityPassword
();
if
(
mUsername
.
isEmpty
()
||
mPassword
.
isEmpty
()){
UBLoginDlg
dlg
;
if
(
dlg
.
exec
()
==
QDialog
::
Accepted
)
{
mUsername
=
dlg
.
username
();
mPassword
=
dlg
.
password
();
}
else
return
;
}
UBPublicationDlg
dlg
;
if
(
QDialog
::
Accepted
==
dlg
.
exec
())
{
...
...
@@ -655,73 +651,6 @@ QString UBDocumentPublisher::getBase64Of(QString stringToEncode)
return
stringToEncode
.
toAscii
().
toBase64
();
}
UBLoginDlg
::
UBLoginDlg
(
QWidget
*
parent
,
const
char
*
name
)
:
QDialog
(
parent
)
,
mUsernameLabel
(
tr
(
"Username:"
),
this
)
,
mUsernameLineEdit
(
this
)
,
mPasswordLabel
(
tr
(
"Password:"
),
this
)
,
mPasswordLineEdit
(
this
)
,
mRememberLabel
(
tr
(
"Remember credentials"
),
this
)
,
mButtons
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
Qt
::
Horizontal
,
this
)
{
setObjectName
(
name
);
setFixedSize
(
400
,
150
);
setWindowTitle
(
tr
(
"Login"
));
setLayout
(
&
mLayout
);
mLayout
.
addLayout
(
&
mUsernameLayout
);
mLayout
.
addLayout
(
&
mPasswordLayout
);
mLayout
.
addLayout
(
&
mRememberLayout
);
mUsernameLayout
.
addWidget
(
&
mUsernameLabel
,
0
);
mUsernameLayout
.
addWidget
(
&
mUsernameLineEdit
,
1
);
mPasswordLayout
.
addWidget
(
&
mPasswordLabel
,
0
);
mPasswordLineEdit
.
setEchoMode
(
QLineEdit
::
Password
);
mPasswordLayout
.
addWidget
(
&
mPasswordLineEdit
,
1
);
mRememberLayout
.
addWidget
(
&
mRememberCheckBox
,
0
);
mRememberLayout
.
addWidget
(
&
mRememberLabel
,
1
);
mLayout
.
addWidget
(
&
mButtons
);
connect
(
&
mButtons
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
onButtonsAccepted
()));
connect
(
&
mButtons
,
SIGNAL
(
rejected
()),
this
,
SLOT
(
reject
()));
}
UBLoginDlg
::~
UBLoginDlg
()
{
/* NOOP */
}
QString
UBLoginDlg
::
username
()
{
return
mUsernameLineEdit
.
text
();
}
QString
UBLoginDlg
::
password
()
{
return
mPasswordLineEdit
.
text
();
}
bool
UBLoginDlg
::
hasToRemember
()
{
return
mRememberCheckBox
.
checkState
()
==
Qt
::
Checked
;
}
void
UBLoginDlg
::
onButtonsAccepted
()
{
if
(
username
().
isEmpty
()
||
password
().
isEmpty
())
return
;
if
(
hasToRemember
())
{
UBSettings
*
settings
=
UBSettings
::
settings
();
settings
->
setCommunityUsername
(
username
());
settings
->
setCommunityPassword
(
password
());
}
accept
();
}
// ---------------------------------------------------------
UBProxyLoginDlg
::
UBProxyLoginDlg
(
QWidget
*
parent
,
const
char
*
name
)
:
QDialog
(
parent
)
,
mpLayout
(
NULL
)
...
...
src/adaptors/publishing/UBDocumentPublisher.h
View file @
076e0edf
...
...
@@ -33,35 +33,6 @@ class UBServerXMLHttpRequest;
class
UBGraphicsW3CWidgetItem
;
class
QWebView
;
class
UBLoginDlg
:
public
QDialog
{
Q_OBJECT
public
:
UBLoginDlg
(
QWidget
*
parent
=
0
,
const
char
*
name
=
"LoginDlg"
);
~
UBLoginDlg
();
QString
username
();
QString
password
();
private
slots
:
void
onButtonsAccepted
();
private
:
bool
hasToRemember
();
QVBoxLayout
mLayout
;
QHBoxLayout
mUsernameLayout
;
QHBoxLayout
mPasswordLayout
;
QHBoxLayout
mRememberLayout
;
QLabel
mUsernameLabel
;
QLineEdit
mUsernameLineEdit
;
QLabel
mPasswordLabel
;
QLineEdit
mPasswordLineEdit
;
QCheckBox
mRememberCheckBox
;
QLabel
mRememberLabel
;
QDialogButtonBox
mButtons
;
};
class
UBProxyLoginDlg
:
public
QDialog
{
Q_OBJECT
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment