Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
c8852b45
Commit
c8852b45
authored
Jul 17, 2012
by
Max-Wilhelm Bruker
Browse files
don't open database in connection pools if main database connection is not valid
parent
2c22fc93
Changes
1
Hide whitespace changes
Inline
Side-by-side
servatrice/src/servatrice_database_interface.cpp
View file @
c8852b45
...
...
@@ -22,8 +22,10 @@ Servatrice_DatabaseInterface::~Servatrice_DatabaseInterface()
void
Servatrice_DatabaseInterface
::
initDatabase
(
const
QSqlDatabase
&
_sqlDatabase
)
{
sqlDatabase
=
QSqlDatabase
::
cloneDatabase
(
_sqlDatabase
,
"pool_"
+
QString
::
number
(
instanceId
));
openDatabase
();
if
(
_sqlDatabase
.
isValid
())
{
sqlDatabase
=
QSqlDatabase
::
cloneDatabase
(
_sqlDatabase
,
"pool_"
+
QString
::
number
(
instanceId
));
openDatabase
();
}
}
void
Servatrice_DatabaseInterface
::
initDatabase
(
const
QString
&
type
,
const
QString
&
hostName
,
const
QString
&
databaseName
,
const
QString
&
userName
,
const
QString
&
password
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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