LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
closingdb.cpp
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#include "
closingdb.h
"
10
#include <QtDebug>
11
12
namespace
LC::Util
13
{
14
ClosingDB::ClosingDB
(
const
QString& driver,
const
QString& connName)
15
: DB_ { QSqlDatabase::contains (connName) ?
16
QSqlDatabase::database (connName) :
17
QSqlDatabase::addDatabase (driver, connName) }
18
{
19
}
20
21
ClosingDB::~ClosingDB
()
22
{
23
}
24
25
ClosingDB::operator
const
QSqlDatabase& ()
const
26
{
27
return
DB_;
28
}
29
30
ClosingDB::operator QSqlDatabase& ()
31
{
32
return
DB_;
33
}
34
35
const
QSqlDatabase*
ClosingDB::operator->
()
const
36
{
37
return
&DB_;
38
}
39
40
QSqlDatabase*
ClosingDB::operator->
()
41
{
42
return
&DB_;
43
}
44
}
LC::Util
Definition:
icoreproxy.h:33
LC::Util::ClosingDB::~ClosingDB
~ClosingDB()
Definition:
closingdb.cpp:27
LC::Util::ClosingDB::ClosingDB
ClosingDB(const QString &driver, const QString &connName)
Definition:
closingdb.cpp:20
closingdb.h
LC::Util::ClosingDB::operator->
const QSqlDatabase * operator->() const
Definition:
closingdb.cpp:41
src
util
db
closingdb.cpp
Generated by
1.8.17