Compare commits
No commits in common. "ba6faaaf7e4a8d3bbc0b6d159d671c553cc2f4d0" and "385f2840479e2dfe908041fefbac18e994a2b469" have entirely different histories.
ba6faaaf7e
...
385f284047
12
auth.cpp
12
auth.cpp
|
|
@ -33,16 +33,4 @@ auth::auth (QWidget *parent)
|
|||
void
|
||||
auth::onAuth ()
|
||||
{
|
||||
QSqlDatabase *db = new QSqlDatabase(QSqlDatabase::addDatabase("QPSQL"));
|
||||
db->setHostName(_addressEdit->text());
|
||||
db->setPort(_portEdit->text().toInt());
|
||||
db->setDatabaseName("cards");
|
||||
db->setUserName(_nicknameEdit->text());
|
||||
db->setPassword(_passwordEdit->text());
|
||||
bool ok = db->open();
|
||||
if (ok) {
|
||||
emit dbOpenned(db);
|
||||
}
|
||||
|
||||
close();
|
||||
}
|
||||
|
|
|
|||
2
auth.h
2
auth.h
|
|
@ -4,7 +4,6 @@
|
|||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#include <QSqlDatabase>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
|
||||
|
|
@ -29,7 +28,6 @@ private:
|
|||
public slots:
|
||||
void onAuth ();
|
||||
signals:
|
||||
void dbOpenned(QSqlDatabase *);
|
||||
};
|
||||
|
||||
#endif // AUTH_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue