mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 16:29:44 -05:00
parent
ba68e0a4a1
commit
3415073051
@ -100,7 +100,8 @@ void DatabaseOpenWidget::openDatabase()
|
|||||||
|
|
||||||
QFile file(m_filename);
|
QFile file(m_filename);
|
||||||
if (!file.open(QIODevice::ReadOnly)) {
|
if (!file.open(QIODevice::ReadOnly)) {
|
||||||
// TODO: error message
|
MessageBox::warning(this, tr("Error"), tr("Unable to open the database.").append("\n")
|
||||||
|
.append(file.errorString()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m_db) {
|
if (m_db) {
|
||||||
|
@ -60,7 +60,8 @@ void DatabaseRepairWidget::openDatabase()
|
|||||||
|
|
||||||
QFile file(m_filename);
|
QFile file(m_filename);
|
||||||
if (!file.open(QIODevice::ReadOnly)) {
|
if (!file.open(QIODevice::ReadOnly)) {
|
||||||
// TODO: error message
|
MessageBox::warning(this, tr("Error"), tr("Unable to open the database.").append("\n")
|
||||||
|
.append(file.errorString()));
|
||||||
Q_EMIT editFinished(false);
|
Q_EMIT editFinished(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -132,11 +132,10 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
|
|||||||
|
|
||||||
// test if we can read/write or read the file
|
// test if we can read/write or read the file
|
||||||
QFile file(fileName);
|
QFile file(fileName);
|
||||||
// TODO: error handling
|
|
||||||
if (!file.open(QIODevice::ReadWrite)) {
|
if (!file.open(QIODevice::ReadWrite)) {
|
||||||
if (!file.open(QIODevice::ReadOnly)) {
|
if (!file.open(QIODevice::ReadOnly)) {
|
||||||
// can't open
|
MessageBox::warning(this, tr("Error"), tr("Unable to open the database.").append("\n")
|
||||||
// TODO: error message
|
.append(file.errorString()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -49,7 +49,8 @@ void KeePass1OpenWidget::openDatabase()
|
|||||||
|
|
||||||
QFile file(m_filename);
|
QFile file(m_filename);
|
||||||
if (!file.open(QIODevice::ReadOnly)) {
|
if (!file.open(QIODevice::ReadOnly)) {
|
||||||
// TODO: error message
|
MessageBox::warning(this, tr("Error"), tr("Unable to open the database.").append("\n")
|
||||||
|
.append(file.errorString()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m_db) {
|
if (m_db) {
|
||||||
|
Loading…
Reference in New Issue
Block a user