Diffstat (limited to 'microkde/kresources/managerimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/managerimpl.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/microkde/kresources/managerimpl.cpp b/microkde/kresources/managerimpl.cpp index a6d2007..4c0751c 100644 --- a/microkde/kresources/managerimpl.cpp +++ b/microkde/kresources/managerimpl.cpp | |||
@@ -14,48 +14,50 @@ | |||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16 | Library General Public License for more details. | 16 | Library General Public License for more details. |
17 | 17 | ||
18 | You should have received a copy of the GNU Library General Public License | 18 | You should have received a copy of the GNU Library General Public License |
19 | along with this library; see the file COPYING.LIB. If not, write to | 19 | along with this library; see the file COPYING.LIB. If not, write to |
20 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 20 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
21 | Boston, MA 02111-1307, USA. | 21 | Boston, MA 02111-1307, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <kglobal.h> | 31 | #include <kglobal.h> |
32 | 32 | ||
33 | #include <kapplication.h> | 33 | #include <kapplication.h> |
34 | #include <kdebug.h> | 34 | #include <kdebug.h> |
35 | #include <kconfig.h> | 35 | #include <kconfig.h> |
36 | #include <kstandarddirs.h> | 36 | #include <kstandarddirs.h> |
37 | #include <qfile.h> | 37 | #include <qfile.h> |
38 | //Added by qt3to4: | ||
39 | #include <Q3PtrList> | ||
38 | 40 | ||
39 | #include "resource.h" | 41 | #include "resource.h" |
40 | #include "factory.h" | 42 | #include "factory.h" |
41 | #include "managerimpl.h" | 43 | #include "managerimpl.h" |
42 | 44 | ||
43 | 45 | ||
44 | 46 | ||
45 | using namespace KRES; | 47 | using namespace KRES; |
46 | 48 | ||
47 | ManagerImpl::ManagerImpl( const QString &family ) | 49 | ManagerImpl::ManagerImpl( const QString &family ) |
48 | : mFamily( family ), mConfig( 0 ), mStdConfig( 0 ), mStandard( 0 ), | 50 | : mFamily( family ), mConfig( 0 ), mStdConfig( 0 ), mStandard( 0 ), |
49 | mFactory( 0 ) | 51 | mFactory( 0 ) |
50 | 52 | ||
51 | { | 53 | { |
52 | kdDebug(5650) << "ManagerImpl::ManagerImpl()" << endl; | 54 | kdDebug(5650) << "ManagerImpl::ManagerImpl()" << endl; |
53 | 55 | ||
54 | 56 | ||
55 | } | 57 | } |
56 | 58 | ||
57 | ManagerImpl::~ManagerImpl() | 59 | ManagerImpl::~ManagerImpl() |
58 | { | 60 | { |
59 | kdDebug(5650) << "ManagerImpl::~ManagerImpl()" << endl; | 61 | kdDebug(5650) << "ManagerImpl::~ManagerImpl()" << endl; |
60 | 62 | ||
61 | Resource::List::ConstIterator it; | 63 | Resource::List::ConstIterator it; |
@@ -211,62 +213,62 @@ void ManagerImpl::resourceChanged( Resource *resource ) | |||
211 | 213 | ||
212 | // ManagerIface_stub allManagers( "*", "ManagerIface_" + mFamily.utf8() ); | 214 | // ManagerIface_stub allManagers( "*", "ManagerIface_" + mFamily.utf8() ); |
213 | // allManagers.dcopResourceModified( resource->identifier() ); | 215 | // allManagers.dcopResourceModified( resource->identifier() ); |
214 | } | 216 | } |
215 | 217 | ||
216 | // DCOP asynchronous functions | 218 | // DCOP asynchronous functions |
217 | //US since we work from inside the application, we call the methods directly. | 219 | //US since we work from inside the application, we call the methods directly. |
218 | 220 | ||
219 | QStringList ManagerImpl::resourceNames() | 221 | QStringList ManagerImpl::resourceNames() |
220 | { | 222 | { |
221 | QStringList result; | 223 | QStringList result; |
222 | 224 | ||
223 | Resource::List::ConstIterator it; | 225 | Resource::List::ConstIterator it; |
224 | for ( it = mResources.begin(); it != mResources.end(); ++it ) { | 226 | for ( it = mResources.begin(); it != mResources.end(); ++it ) { |
225 | result.append( (*it)->resourceName() ); | 227 | result.append( (*it)->resourceName() ); |
226 | } | 228 | } |
227 | return result; | 229 | return result; |
228 | } | 230 | } |
229 | 231 | ||
230 | Resource::List *ManagerImpl::resourceList() | 232 | Resource::List *ManagerImpl::resourceList() |
231 | { | 233 | { |
232 | return &mResources; | 234 | return &mResources; |
233 | } | 235 | } |
234 | 236 | ||
235 | QPtrList<Resource> ManagerImpl::resources() | 237 | Q3PtrList<Resource> ManagerImpl::resources() |
236 | { | 238 | { |
237 | QPtrList<Resource> result; | 239 | Q3PtrList<Resource> result; |
238 | 240 | ||
239 | Resource::List::ConstIterator it; | 241 | Resource::List::ConstIterator it; |
240 | for ( it = mResources.begin(); it != mResources.end(); ++it ) { | 242 | for ( it = mResources.begin(); it != mResources.end(); ++it ) { |
241 | result.append( *it ); | 243 | result.append( *it ); |
242 | } | 244 | } |
243 | return result; | 245 | return result; |
244 | } | 246 | } |
245 | 247 | ||
246 | QPtrList<Resource> ManagerImpl::resources( bool active ) | 248 | Q3PtrList<Resource> ManagerImpl::resources( bool active ) |
247 | { | 249 | { |
248 | QPtrList<Resource> result; | 250 | Q3PtrList<Resource> result; |
249 | 251 | ||
250 | Resource::List::ConstIterator it; | 252 | Resource::List::ConstIterator it; |
251 | for ( it = mResources.begin(); it != mResources.end(); ++it ) { | 253 | for ( it = mResources.begin(); it != mResources.end(); ++it ) { |
252 | if ( (*it)->isActive() == active ) { | 254 | if ( (*it)->isActive() == active ) { |
253 | result.append( *it ); | 255 | result.append( *it ); |
254 | } | 256 | } |
255 | } | 257 | } |
256 | return result; | 258 | return result; |
257 | } | 259 | } |
258 | 260 | ||
259 | void ManagerImpl::setListener( ManagerImplListener *listener ) | 261 | void ManagerImpl::setListener( ManagerImplListener *listener ) |
260 | { | 262 | { |
261 | mListener = listener; | 263 | mListener = listener; |
262 | } | 264 | } |
263 | 265 | ||
264 | Resource* ManagerImpl::readResourceConfig( const QString& identifier, | 266 | Resource* ManagerImpl::readResourceConfig( const QString& identifier, |
265 | bool checkActive ) | 267 | bool checkActive ) |
266 | { | 268 | { |
267 | kdDebug() << "ManagerImpl::readResourceConfig() " << identifier << endl; | 269 | kdDebug() << "ManagerImpl::readResourceConfig() " << identifier << endl; |
268 | 270 | ||
269 | // qDebug("ManagerImpl::readResourceConfig() %s", identifier.latin1()); | 271 | // qDebug("ManagerImpl::readResourceConfig() %s", identifier.latin1()); |
270 | 272 | ||
271 | mConfig->setGroup( "Resource_" + identifier ); | 273 | mConfig->setGroup( "Resource_" + identifier ); |
272 | #ifdef _WIN32_ | 274 | #ifdef _WIN32_ |