-
Notifications
You must be signed in to change notification settings - Fork 32
/
db_location.patch
31 lines (26 loc) · 1.15 KB
/
db_location.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 3a43f79..220ab40 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -20,7 +20,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->listView,SIGNAL(clicked(QModelIndex)),this,SLOT(pilihKata(QModelIndex)));
// Init Database
- QString mNamaDb = "KBBI.db";
+ QString mNamaDb = "/opt/KBBI-Qt/KBBI.db";
QFileInfo mFileDb(mNamaDb);
// qDebug()<< "Lokasi DB : " << mFileDb.absoluteFilePath();
@@ -40,7 +40,7 @@ MainWindow::MainWindow(QWidget *parent) :
// Connect to DB
database = QSqlDatabase::addDatabase("QSQLITE");
- database.setDatabaseName("KBBI.db");
+ database.setDatabaseName("/opt/KBBI-Qt/KBBI.db");
database.open();
// qDebug()<< "Is connect? " << database.open();
@@ -73,7 +73,7 @@ void MainWindow::copyDBfromRes(){
// Nama File output copy
// Tanpa full absolute path supaya diletakkan satu level
// di direktori yang sama dengan file aplikasi
- QString fileOut = "KBBI.db";
+ QString fileOut = "/opt/KBBI-Qt/KBBI.db";
// Copy File dari Resource File
if(QFile::copy(":/data/KBBI.db",fileOut)){