summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
index 489ab17..2db9cd0 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
@@ -19,6 +19,7 @@
#include "config.h"
#include "qwebdatabase.h"
+
#include "qwebdatabase_p.h"
#include "qwebsecurityorigin.h"
#include "qwebsecurityorigin_p.h"
@@ -69,8 +70,12 @@ QString QWebDatabase::name() const
*/
QString QWebDatabase::displayName() const
{
+#if ENABLE(DATABASE)
DatabaseDetails details = DatabaseTracker::tracker().detailsForNameAndOrigin(d->name, d->origin.get());
return details.displayName();
+#else
+ return QString();
+#endif
}
/*!
@@ -78,8 +83,12 @@ QString QWebDatabase::displayName() const
*/
qint64 QWebDatabase::expectedSize() const
{
+#if ENABLE(DATABASE)
DatabaseDetails details = DatabaseTracker::tracker().detailsForNameAndOrigin(d->name, d->origin.get());
return details.expectedUsage();
+#else
+ return 0;
+#endif
}
/*!
@@ -87,8 +96,12 @@ qint64 QWebDatabase::expectedSize() const
*/
qint64 QWebDatabase::size() const
{
+#if ENABLE(DATABASE)
DatabaseDetails details = DatabaseTracker::tracker().detailsForNameAndOrigin(d->name, d->origin.get());
return details.currentUsage();
+#else
+ return 0;
+#endif
}
/*!
@@ -118,7 +131,11 @@ QWebDatabase::QWebDatabase(QWebDatabasePrivate* priv)
*/
QString QWebDatabase::fileName() const
{
+#if ENABLE(DATABASE)
return DatabaseTracker::tracker().fullPathForDatabase(d->origin.get(), d->name, false);
+#else
+ return QString();
+#endif
}
/*!
@@ -137,7 +154,9 @@ QWebSecurityOrigin QWebDatabase::origin() const
*/
void QWebDatabase::removeDatabase(const QWebDatabase &db)
{
+#if ENABLE(DATABASE)
DatabaseTracker::tracker().deleteDatabase(db.d->origin.get(), db.d->name);
+#endif
}
/*!
@@ -146,3 +165,4 @@ void QWebDatabase::removeDatabase(const QWebDatabase &db)
QWebDatabase::~QWebDatabase()
{
}
+