summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimaccessfactory.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/libopie2/opiepim/core/opimaccessfactory.h b/libopie2/opiepim/core/opimaccessfactory.h
index 6aaa5e4..a80e67c 100644
--- a/libopie2/opiepim/core/opimaccessfactory.h
+++ b/libopie2/opiepim/core/opimaccessfactory.h
@@ -78,18 +78,18 @@ class OPimAccessFactory
78 * @see OPimGlobal 78 * @see OPimGlobal
79 */ 79 */
80 static T* create( OPimGlobal::PimType type, OPimGlobal::DatabaseStyle dbStyle, const QString& appName ){ 80 static T* create( OPimGlobal::PimType type, OPimGlobal::DatabaseStyle dbStyle, const QString& appName ){
81 81 OPimBase *base;
82 switch ( type ){ 82 switch ( type ){
83 case OPimGlobal::TODOLIST: 83 case OPimGlobal::TODOLIST:
84 return dynamic_cast<T*>( new OPimTodoAccess( OBackendFactory<OPimTodoAccessBackend>::create( type, dbStyle, appName ) ) ); 84 base = new OPimTodoAccess( OBackendFactory<OPimTodoAccessBackend>::create( type, dbStyle, appName ) );
85 case OPimGlobal::CONTACTLIST: 85 case OPimGlobal::CONTACTLIST:
86 return dynamic_cast<T*>( new OPimContactAccess( QString::null, QString::null, OBackendFactory<OPimContactAccessBackend>::create( type, dbStyle, appName ) ) ); 86 base = new OPimContactAccess( QString::null, QString::null, OBackendFactory<OPimContactAccessBackend>::create( type, dbStyle, appName ) );
87 case OPimGlobal::DATEBOOK: 87 case OPimGlobal::DATEBOOK:
88 return dynamic_cast<T*>( new ODateBookAccess( OBackendFactory<ODateBookAccessBackend>::create( type, dbStyle, appName ) ) ); 88 base = new ODateBookAccess( OBackendFactory<ODateBookAccessBackend>::create( type, dbStyle, appName ) );
89 default: 89 default:
90 return 0l; 90 return 0l;
91
92 } 91 }
92 return static_cast<T*>( base );
93 } 93 }
94 94
95 95