[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kexi/kexidb
From: Martin Ellis <martin.ellis () kdemail ! net>
Date: 2006-05-27 23:56:18
Message-ID: 1148774178.300588.28538.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 545652 by martin:
Fix for new KTrader API which distinguishes between
services and mimetypes.
Qt4-ify new alter-table code.
M +4 -4 alter.cpp
M +7 -7 alter.h
M +3 -3 drivermanager.cpp
M +10 -0 global.h
--- trunk/koffice/kexi/kexidb/alter.cpp #545651:545652
@@ -110,15 +110,15 @@
//--------------------------------------------------------
-static KStaticDeleter< QMap<QCString,int> > KexiDB_alteringTypeForProperty_deleter;
-QMap<QCString,int> *KexiDB_alteringTypeForProperty = 0;
+static KStaticDeleter< QMap<Q3CString,int> > KexiDB_alteringTypeForProperty_deleter;
+QMap<Q3CString,int> *KexiDB_alteringTypeForProperty = 0;
//! @internal
static int alteringTypeForProperty(const char *propertyName)
{
if (!KexiDB_alteringTypeForProperty) {
KexiDB_alteringTypeForProperty_deleter.setObject( KexiDB_alteringTypeForProperty,
- new QMap<QCString,int>() );
+ new QMap<Q3CString,int>() );
#define I(name, type) \
KexiDB_alteringTypeForProperty->insert(name, AlterTableHandler::type)
#define I2(name, type1, type2) \
@@ -261,7 +261,7 @@
// is related to newName
// e.g. if there is setCaption("B", "captionA") action after rename("A","B"),
// replace setCaption action with setCaption("A", "captionA")
- foreach_dict (ActionDictIterator, it, *actionsLikeThis) {
+ foreach_dict (ActionDictIterator, it, *actionsLikeThis) {
dynamic_cast<ChangeFieldPropertyAction*>(it.current())->m_fieldName = fieldName();
}
}
--- trunk/koffice/kexi/kexidb/alter.h #545651:545652
@@ -23,7 +23,7 @@
#include "connection.h"
#include <q3valuelist.h>
-#include <qasciidict.h>
+#include <q3asciidict.h>
#include <kdebug.h>
@@ -132,16 +132,16 @@
};
class ActionBase;
- typedef QAsciiDict<ActionBase> ActionDict;
- typedef QAsciiDict< ActionDict > ActionDictDict;
- typedef QAsciiDictIterator<ActionBase> ActionDictIterator;
- typedef QAsciiDictIterator< ActionDict > ActionDictDictIterator;
+ typedef Q3AsciiDict<ActionBase> ActionDict;
+ typedef Q3AsciiDict< ActionDict > ActionDictDict;
+ typedef Q3AsciiDictIterator<ActionBase> ActionDictIterator;
+ typedef Q3AsciiDictIterator< ActionDict > ActionDictDictIterator;
//! Defines a type for action list.
- typedef QPtrList<ActionBase> ActionList;
+ typedef Q3PtrList<ActionBase> ActionList;
//! Defines a type for action list's iterator.
- typedef QPtrListIterator<ActionBase> ActionListIterator;
+ typedef Q3PtrListIterator<ActionBase> ActionListIterator;
//! Abstract base class used for implementing all the AlterTable actions.
class KEXI_DB_EXPORT ActionBase {
--- trunk/koffice/kexi/kexidb/drivermanager.cpp #545651:545652
@@ -28,7 +28,7 @@
#include <klibloader.h>
#include <kparts/componentfactory.h>
-#include <ktrader.h>
+#include <kservicetypetrader.h>
#include <kdebug.h>
#include <klocale.h>
#include <kservice.h>
@@ -97,8 +97,8 @@
lookupDriversNeeded = false;
clearError();
- KTrader::OfferList tlist = KTrader::self()->query("Kexi/DBDriver");
- KTrader::OfferList::ConstIterator it(tlist.constBegin());
+ KService::List tlist = KServiceTypeTrader::self()->query("Kexi/DBDriver");
+ KService::List::ConstIterator it(tlist.constBegin());
for(; it != tlist.constEnd(); ++it)
{
KService::Ptr ptr = (*it);
--- trunk/koffice/kexi/kexidb/global.h #545651:545652
@@ -120,5 +120,15 @@
}
+
+/*
+ * TODO: Remove these once we start using Qt4 containers:
+ * Shortcuts for iterating over Q3PtrList and Q3PtrDict
+ */
+#define foreach_list(_class, _variable, _list) \
+ for (_class _variable(_list); _variable.current(); ++_variable)
+
+#define foreach_dict(_class, _variable, _list) foreach_list(_class, _variable, _list)
+
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic