Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_vip
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaojing.zhang
fmp_vip
Commits
1896782c
Commit
1896782c
authored
Aug 08, 2017
by
guanghui.cui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复sqlite读取异常
parent
6be36ff2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
backup/fmbackup.cpp
+2
-2
fmp_vip_server.cpp
+1
-0
No files found.
backup/fmbackup.cpp
View file @
1896782c
...
@@ -36,7 +36,7 @@ bool FMBackup::connect()
...
@@ -36,7 +36,7 @@ bool FMBackup::connect()
if
(
!
QFile
::
exists
(
dbname
))
{
if
(
!
QFile
::
exists
(
dbname
))
{
isOk
=
createTable
(
dbname
);
isOk
=
createTable
(
dbname
);
}
else
{
}
else
{
_db
=
QSqlDatabase
::
addDatabase
(
"QSQLITE"
);
_db
=
QSqlDatabase
::
addDatabase
(
"QSQLITE"
,
"fmvipbackupdb"
);
_db
.
setDatabaseName
(
dbname
);
_db
.
setDatabaseName
(
dbname
);
isOk
=
_db
.
open
();
isOk
=
_db
.
open
();
}
}
...
@@ -51,7 +51,7 @@ bool FMBackup::connect()
...
@@ -51,7 +51,7 @@ bool FMBackup::connect()
bool
FMBackup
::
createTable
(
const
QString
&
dbname
)
bool
FMBackup
::
createTable
(
const
QString
&
dbname
)
{
{
_db
=
QSqlDatabase
::
addDatabase
(
"QSQLITE"
);
_db
=
QSqlDatabase
::
addDatabase
(
"QSQLITE"
,
"fmvipbackupdb"
);
_db
.
setDatabaseName
(
dbname
);
_db
.
setDatabaseName
(
dbname
);
_db
.
open
();
_db
.
open
();
QSqlQuery
query
(
_db
);
QSqlQuery
query
(
_db
);
...
...
fmp_vip_server.cpp
View file @
1896782c
...
@@ -15,6 +15,7 @@ FMPVipServer::FMPVipServer() :
...
@@ -15,6 +15,7 @@ FMPVipServer::FMPVipServer() :
socket
(
nullptr
),
socket
(
nullptr
),
dispatcher
(
new
FMVipDispatcher
(
this
))
dispatcher
(
new
FMVipDispatcher
(
this
))
{
{
FMP_INFO
()
<<
"Listen port:23770 "
;
Listen
(
23770
);
Listen
(
23770
);
connect
(
this
,
&
QTcpServer
::
newConnection
,
this
,
&
FMPVipServer
::
onNewConnection
);
connect
(
this
,
&
QTcpServer
::
newConnection
,
this
,
&
FMPVipServer
::
onNewConnection
);
}
}
...
...
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