Browse Source

Rename KShared

tags/r14.0.0
Timothy Pearson 6 years ago
parent
commit
12f3d421cd
58 changed files with 178 additions and 178 deletions
  1. 2
    2
      TODO
  2. 1
    1
      dnssd/remoteservice.h
  3. 2
    2
      dnssd/servicebase.h
  4. 2
    2
      kabc/scripts/addressee.src.cpp
  5. 1
    1
      kabc/scripts/addressee.src.h
  6. 2
    2
      kate/part/katetextline.h
  7. 4
    4
      kded/kdedmodule.cpp
  8. 2
    2
      kded/kdedmodule.h
  9. 1
    1
      kded/test/test.cpp
  10. 1
    1
      tdecore/kdebug.areas
  11. 1
    1
      tdecore/kglobal.cpp
  12. 2
    2
      tdecore/kglobal.h
  13. 3
    3
      tdecore/kicontheme.cpp
  14. 5
    5
      tdecore/kinstance.cpp
  15. 2
    2
      tdecore/kinstance.h
  16. 2
    2
      tdecore/klockfile.h
  17. 2
    2
      tdecore/kmountpoint.h
  18. 34
    34
      tdecore/ksharedptr.h
  19. 2
    2
      tdecore/ktimezones.cpp
  20. 3
    3
      tdecore/ktimezones.h
  21. 2
    2
      tdecore/kuser.cpp
  22. 2
    2
      tdecore/kuser.h
  23. 8
    8
      tdecore/tdeconfig.cpp
  24. 8
    8
      tdecore/tdeconfig.h
  25. 2
    2
      tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp
  26. 1
    1
      tdecore/tdeconfig_compiler/tests/test8a.cpp.ref
  27. 1
    1
      tdecore/tdeconfig_compiler/tests/test8a.h.ref
  28. 1
    1
      tdecore/tdeconfig_compiler/tests/test8main.cpp
  29. 1
    1
      tdecore/tdeconfigbackend.h
  30. 2
    2
      tdecore/tdeconfigbase.h
  31. 2
    2
      tdecore/tdeconfigskeleton.cpp
  32. 2
    2
      tdecore/tdeconfigskeleton.h
  33. 2
    2
      tdecore/tdesycocaentry.h
  34. 1
    1
      tdecore/tdesycocafactory.cpp
  35. 1
    1
      tdeio/tdeio/kimageiofactory.h
  36. 1
    1
      tdeio/tdeio/kmimetype.cpp
  37. 1
    1
      tdeio/tdeio/kmimetype.h
  38. 1
    1
      tdeio/tdeio/kprotocolinfo.h
  39. 1
    1
      tdeio/tdeio/kservice.h
  40. 3
    3
      tdeio/tdeio/kservicegroup.h
  41. 1
    1
      tdeio/tdeio/kservicetype.h
  42. 2
    2
      tdeio/tdeio/ktraderparsetree.h
  43. 1
    1
      tdeio/tdeio/tdefilemetainfo.h
  44. 4
    4
      tderesources/configpage.cpp
  45. 2
    2
      tderesources/configpage.h
  46. 1
    1
      tdespell2/README
  47. 5
    5
      tdespell2/broker.cpp
  48. 5
    5
      tdespell2/broker.h
  49. 3
    3
      tdespell2/settings.cpp
  50. 3
    3
      tdespell2/settings.h
  51. 1
    1
      tdespell2/ui/highlighter.cpp
  52. 3
    3
      tdeui/kpanelapplet.cpp
  53. 1
    1
      tdeui/kpanelapplet.h
  54. 3
    3
      tdeui/krootpixmap.cpp
  55. 5
    5
      tdeui/krootpixmap.h
  56. 9
    9
      tdeui/ksharedpixmap.cpp
  57. 11
    11
      tdeui/ksharedpixmap.h
  58. 1
    1
      tdeutils/tdecmoduleinfo.h

+ 2
- 2
TODO View File

@@ -18,11 +18,11 @@ that we would like to make for the next binary incompatible release.

- Remove all KDE_NO_COMPAT from the KDE2 -> KDE3 port before adding new ones for KDE4.

- Remove the smart-to-dumb-pointer conversion operator from KSharedPtr
- Remove the smart-to-dumb-pointer conversion operator from TDESharedPtr
and replace it with a T* Get() member function. An implict conversion is
far too dangerous.
See: http://groups.google.com/groups?selm=4ognb0%243cd%40linda.teleport.com&oe=UTF-8&output=gplain
Also free the client from the requirement to inherit from KShared.
Also free the client from the requirement to inherit from TDEShared.

- Remove all TDESocket, TDEServerSocket, KSocks and KExtendedSocket references
throughout KDE in favor of KNetwork's socket implementations.

+ 1
- 1
dnssd/remoteservice.h View File

@@ -43,7 +43,7 @@ class KDNSSD_EXPORT RemoteService : public TQObject, public ServiceBase
{
Q_OBJECT
public:
typedef KSharedPtr<RemoteService> Ptr;
typedef TDESharedPtr<RemoteService> Ptr;
/**
Creates unresolved service from given DNS label

+ 2
- 2
dnssd/servicebase.h View File

@@ -37,10 +37,10 @@ services of given type are present in given domain.
@short Describes any type of service.
@author Jakub Stachowski
*/
class KDNSSD_EXPORT ServiceBase : public KShared
class KDNSSD_EXPORT ServiceBase : public TDEShared
{
public:
typedef KSharedPtr<ServiceBase> Ptr;
typedef TDESharedPtr<ServiceBase> Ptr;

/**
@param name Service name - empty for metaservices

+ 2
- 2
kabc/scripts/addressee.src.cpp View File

@@ -44,7 +44,7 @@ static bool emailsEquals( const TQStringList&, const TQStringList& );

KABC::SortMode *Addressee::mSortMode = 0;

struct Addressee::AddresseeData : public KShared
struct Addressee::AddresseeData : public TDEShared
{
TQString uid;
TQString uri;
@@ -68,7 +68,7 @@ Addressee::AddresseeData* Addressee::shared_null = 0;
Addressee::AddresseeData* Addressee::makeSharedNull()
{
Addressee::shared_null = new AddresseeData;
shared_null->_KShared_ref(); //just in case (we should add KSD)
shared_null->_TDEShared_ref(); //just in case (we should add KSD)
shared_null->empty = true;
shared_null->changed = false;
shared_null->resource = 0;

+ 1
- 1
kabc/scripts/addressee.src.h View File

@@ -391,7 +391,7 @@ class KABC_EXPORT Addressee
void detach();

struct AddresseeData;
mutable KSharedPtr<AddresseeData> mData;
mutable TDESharedPtr<AddresseeData> mData;

private:
static AddresseeData* shared_null;

+ 2
- 2
kate/part/katetextline.h View File

@@ -38,13 +38,13 @@ class TQTextStream;
* The attribute stores the index to a table that contains fonts and colors
* and also if a character is selected.
*/
class KateTextLine : public KShared
class KateTextLine : public TDEShared
{
public:
/**
* Define a Shared-Pointer type
*/
typedef KSharedPtr<KateTextLine> Ptr;
typedef TDESharedPtr<KateTextLine> Ptr;

public:
/**

+ 4
- 4
kded/kdedmodule.cpp View File

@@ -26,7 +26,7 @@
#include "kdedmodule.h"
#include "tdeconfigdata.h"

typedef TQMap<KEntryKey, KSharedPtr<KShared> > KDEDObjectMap;
typedef TQMap<KEntryKey, TDESharedPtr<TDEShared> > KDEDObjectMap;

class KDEDModulePrivate
{
@@ -62,7 +62,7 @@ void KDEDModule::resetIdle()
d->timer.start(d->timeout, true);
}

void KDEDModule::insert(const TQCString &app, const TQCString &key, KShared *obj)
void KDEDModule::insert(const TQCString &app, const TQCString &key, TDEShared *obj)
{
if (!d->objMap)
d->objMap = new KDEDObjectMap;
@@ -74,13 +74,13 @@ void KDEDModule::insert(const TQCString &app, const TQCString &key, KShared *obj
KEntryKey indexKey(app, key);

// Prevent deletion in case the same object is inserted again.
KSharedPtr<KShared> _obj = obj;
TDESharedPtr<TDEShared> _obj = obj;

d->objMap->replace(indexKey, _obj);
resetIdle();
}

KShared * KDEDModule::find(const TQCString &app, const TQCString &key)
TDEShared * KDEDModule::find(const TQCString &app, const TQCString &key)
{
if (!d->objMap)
return 0;

+ 2
- 2
kded/kdedmodule.h View File

@@ -91,12 +91,12 @@ public:
* Any previous object inserted with the same values for @p app
* and @p key will be removed.
*/
void insert(const TQCString &app, const TQCString &key, KShared *obj);
void insert(const TQCString &app, const TQCString &key, TDEShared *obj);

/**
* Lookup object indexed with @p app and @p key
*/
KShared *find(const TQCString &app, const TQCString &key);
TDEShared *find(const TQCString &app, const TQCString &key);
/**
* remove object indexed with @p app and @p key.

+ 1
- 1
kded/test/test.cpp View File

@@ -1,6 +1,6 @@
#include "test.h"

class TestObject : public KShared
class TestObject : public TDEShared
{
public:
TestObject(const TQCString &_app) : app(_app)

+ 1
- 1
tdecore/kdebug.areas View File

@@ -33,7 +33,7 @@
264 tdecore (KIconLoader)
265 tdecore (KIconEffect)
270 tdeui (KRootPixmap)
280 tdeui (KSharedPixmap)
280 tdeui (TDESharedPixmap)
281 tdeui (TDECModule)
282 tdeui (KDockWidget)
290 tdeui (KPixmapIO)

+ 1
- 1
tdecore/kglobal.cpp View File

@@ -67,7 +67,7 @@ TDEConfig *TDEGlobal::config()
return _instance->config();
}

KSharedConfig *TDEGlobal::sharedConfig()
TDESharedConfig *TDEGlobal::sharedConfig()
{
MYASSERT(_instance);


+ 2
- 2
tdecore/kglobal.h View File

@@ -23,7 +23,7 @@

class KCharsets;
class TDEConfig;
class KSharedConfig;
class TDESharedConfig;
class KIconLoader;
class TDEHardwareDevices;
class TDEGlobalNetworkManager;
@@ -71,7 +71,7 @@ public:
* Returns the general config object.
* @return the global configuration object.
*/
static KSharedConfig *sharedConfig();
static TDESharedConfig *sharedConfig();

/**
* Returns an iconloader object.

+ 3
- 3
tdecore/kicontheme.cpp View File

@@ -43,7 +43,7 @@ public:
TQString example, screenshot;
TQString linkOverlay, lockOverlay, zipOverlay, shareOverlay;
bool hidden;
KSharedConfig::Ptr sharedConfig;
TDESharedConfig::Ptr sharedConfig;
};

/**
@@ -136,9 +136,9 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
fileName = mDir + "index.theme";
mainSection="Icon Theme";
}
// Use KSharedConfig to avoid parsing the file many times, from each kinstance.
// Use TDESharedConfig to avoid parsing the file many times, from each kinstance.
// Need to keep a ref to it to make this useful
d->sharedConfig = KSharedConfig::openConfig( fileName, true /*readonly*/, false /*useKDEGlobals*/ );
d->sharedConfig = TDESharedConfig::openConfig( fileName, true /*readonly*/, false /*useKDEGlobals*/ );
TDEConfig& cfg = *d->sharedConfig;
//was: KSimpleConfig cfg(fileName);


+ 5
- 5
tdecore/kinstance.cpp View File

@@ -65,7 +65,7 @@ public:
KMimeSourceFactory* mimeSourceFactory;
TQString configName;
bool ownAboutdata;
KSharedConfig::Ptr sharedConfig;
TDESharedConfig::Ptr sharedConfig;
};

TDEInstance::TDEInstance( const TQCString& name)
@@ -201,7 +201,7 @@ TDEConfig *TDEInstance::config() const
if( _config == 0 ) {
if ( !d->configName.isEmpty() )
{
d->sharedConfig = KSharedConfig::openConfig( d->configName );
d->sharedConfig = TDESharedConfig::openConfig( d->configName );

// Check whether custom config files are allowed.
d->sharedConfig->setGroup( "KDE Action Restrictions" );
@@ -220,10 +220,10 @@ TDEConfig *TDEInstance::config() const
if ( d->sharedConfig == 0 )
{
if ( !_name.isEmpty() ) {
d->sharedConfig = KSharedConfig::openConfig( _name + "rc", m_configReadOnly );
d->sharedConfig = TDESharedConfig::openConfig( _name + "rc", m_configReadOnly );
}
else {
d->sharedConfig = KSharedConfig::openConfig( TQString::null );
d->sharedConfig = TDESharedConfig::openConfig( TQString::null );
}
}

@@ -244,7 +244,7 @@ TDEConfig *TDEInstance::config() const
return _config;
}

KSharedConfig *TDEInstance::sharedConfig() const
TDESharedConfig *TDEInstance::sharedConfig() const
{
DEBUG_CHECK_ALIVE
if (_config == 0)

+ 2
- 2
tdecore/kinstance.h View File

@@ -26,7 +26,7 @@ class KCharsets;
class TQFont;
class TDEInstancePrivate;
class KMimeSourceFactory;
class KSharedConfig;
class TDESharedConfig;
class TDEHardwareDevices;
class TDEGlobalNetworkManager;

@@ -94,7 +94,7 @@ class TDECORE_EXPORT TDEInstance
* Returns the general config object ("appnamerc").
* @return the TDEConfig object for the instance.
*/
KSharedConfig *sharedConfig() const;
TDESharedConfig *sharedConfig() const;

/**
* Set a read-only flag on the configuration files

+ 2
- 2
tdecore/klockfile.h View File

@@ -30,10 +30,10 @@
* @author Waldo Bastian <bastian@kde.org>
* @since 3.3
*/
class TDECORE_EXPORT KLockFile : public KShared
class TDECORE_EXPORT KLockFile : public TDEShared
{
public:
typedef KSharedPtr<KLockFile> Ptr;
typedef TDESharedPtr<KLockFile> Ptr;

KLockFile(const TQString &file);


+ 2
- 2
tdecore/kmountpoint.h View File

@@ -32,11 +32,11 @@
* @author Waldo Bastian <bastian@kde.org>
* @since 3.2
*/
class TDECORE_EXPORT KMountPoint : public KShared
class TDECORE_EXPORT KMountPoint : public TDEShared
{
typedef signed long long int filesize_t;
public:
typedef KSharedPtr<KMountPoint> Ptr;
typedef TDESharedPtr<KMountPoint> Ptr;
typedef TQValueList<Ptr> List;
public:
enum { NeedMountOptions = 1, NeedRealDeviceName = 2 };

+ 34
- 34
tdecore/ksharedptr.h View File

@@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KSharedPTR_H
#define KSharedPTR_H
#ifndef TDESharedPTR_H
#define TDESharedPTR_H

#include "tdelibs_export.h"

/**
* Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with
* KSharedPtr to control the lifetime of your object.
* TDESharedPtr to control the lifetime of your object.
*
* Specifically, all classes that derive from KShared have an internal
* Specifically, all classes that derive from TDEShared have an internal
* counter keeping track of how many other objects have a reference to
* their object. If used with KSharedPtr, then your object will
* their object. If used with TDESharedPtr, then your object will
* not be deleted until all references to the object have been
* released.
*
* You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive
* your class from KShared and forget about it.
* directly -- let the TDESharedPtr take care of that. Just derive
* your class from TDEShared and forget about it.
*
* @author Waldo Bastian <bastian@kde.org>
*/
class TDECORE_EXPORT KShared {
class TDECORE_EXPORT TDEShared {
public:
/**
* Standard constructor. This will initialize the reference count
* on this object to 0.
*/
KShared() : count(0) { }
TDEShared() : count(0) { }

/**
* Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0.
*/
KShared( const KShared & ) : count(0) { }
TDEShared( const TDEShared & ) : count(0) { }

/**
* Overloaded assignment operator.
*/
KShared &operator=(const KShared & ) { return *this; }
TDEShared &operator=(const TDEShared & ) { return *this; }

/**
* Increases the reference count by one.
*/
void _KShared_ref() const { count++; }
void _TDEShared_ref() const { count++; }

/**
* Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself.
*/
void _KShared_unref() const { if (!--count) delete this; }
void _TDEShared_unref() const { if (!--count) delete this; }

/**
* Return the current number of references held.
*
* @return Number of references
*/
int _KShared_count() const { return count; }
int _TDEShared_count() const { return count; }

protected:
virtual ~KShared() { }
virtual ~TDEShared() { }
private:
mutable int count;
};

/**
* Can be used to control the lifetime of an object that has derived
* KShared. As long a someone holds a KSharedPtr on some KShared
* TDEShared. As long a someone holds a TDESharedPtr on some TDEShared
* object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer.
*
* KShared and KSharedPtr are preferred over QShared / QSharedPtr
* TDEShared and TDESharedPtr are preferred over QShared / QSharedPtr
* since they are more safe.
*
* WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't
* call delete on it, for instance) behind KSharedPtr's back.
* call delete on it, for instance) behind TDESharedPtr's back.
*
* @author Waldo Bastian <bastian@kde.org>
*/
template< class T >
class KSharedPtr
class TDESharedPtr
{
public:
/**
* Creates a null pointer.
*/
KSharedPtr()
TDESharedPtr()
: ptr(0) { }
/**
* Creates a new pointer.
* @param t the pointer
*/
KSharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }

/**
* Copies a pointer.
* @param p the pointer to copy
*/
KSharedPtr( const KSharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }

/**
* Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted.
*/
~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
~TDESharedPtr() { if ( ptr ) ptr->_TDEShared_unref(); }

KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
TDESharedPtr<T>& operator= ( const TDESharedPtr<T>& p ) {
if ( ptr == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref();
if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref();
if ( ptr ) ptr->_TDEShared_ref();
return *this;
}
KSharedPtr<T>& operator= ( T* p ) {
TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref();
if ( ptr ) ptr->_TDEShared_unref();
ptr = p;
if ( ptr ) ptr->_KShared_ref();
if ( ptr ) ptr->_TDEShared_ref();
return *this;
}
bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
bool operator== ( const TDESharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
bool operator!= ( const TDESharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
bool operator== ( const T* p ) const { return ( ptr == p ); }
bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); }
@@ -167,7 +167,7 @@ public:
* Returns the number of references.
* @return the number of references
*/
int count() const { return ptr->_KShared_count(); } // for debugging purposes
int count() const { return ptr->_TDEShared_count(); } // for debugging purposes
private:
T* ptr;
};

+ 2
- 2
tdecore/ktimezones.cpp View File

@@ -203,7 +203,7 @@ bool KTimezone::isValidLongitude(float longitude)
}

KTimezone::KTimezone(
KSharedPtr<KTimezoneSource> db, const TQString& name,
TDESharedPtr<KTimezoneSource> db, const TQString& name,
const TQString &countryCode, float latitude, float longitude,
const TQString &comment) :
m_db(db),
@@ -415,7 +415,7 @@ const KTimezones::ZoneMap KTimezones::allZones()
TQTextStream str(&f);
TQRegExp lineSeparator("[ \t]");
TQRegExp ordinateSeparator("[+-]");
KSharedPtr<KTimezoneSource> db(new KTimezoneSource(m_zoneinfoDir));
TDESharedPtr<KTimezoneSource> db(new KTimezoneSource(m_zoneinfoDir));
while (!str.atEnd())
{
TQString line = str.readLine();

+ 3
- 3
tdecore/ktimezones.h View File

@@ -49,7 +49,7 @@ class KTimezonesPrivate;
* @author S.R.Haque <srhaque@iee.org>.
*/
class TDECORE_EXPORT KTimezoneSource :
public KShared
public TDEShared
{
public:
KTimezoneSource(const TQString &db);
@@ -114,7 +114,7 @@ public:
* @param comment description of the timezone, if any.
*/
KTimezone(
KSharedPtr<KTimezoneSource> db, const TQString &name,
TDESharedPtr<KTimezoneSource> db, const TQString &name,
const TQString &countryCode = TQString(), float latitude = UNKNOWN, float longitude = UNKNOWN,
const TQString &comment = TQString());
~KTimezone();
@@ -191,7 +191,7 @@ private:
KTimezone(const KTimezone&);
KTimezone& operator=(const KTimezone&);

KSharedPtr<KTimezoneSource> m_db;
TDESharedPtr<KTimezoneSource> m_db;
TQString m_name;
TQString m_countryCode;
float m_latitude;

+ 2
- 2
tdecore/kuser.cpp View File

@@ -32,7 +32,7 @@
#include <grp.h>


class KUserPrivate : public KShared
class KUserPrivate : public TDEShared
{
public:
bool valid;
@@ -271,7 +271,7 @@ TQStringList KUser::allUserNames() {
KUser::~KUser() {
}

class KUserGroupPrivate : public KShared
class KUserGroupPrivate : public TDEShared
{
public:
bool valid;

+ 2
- 2
tdecore/kuser.h View File

@@ -233,7 +233,7 @@ public:
static TQStringList allUserNames();

private:
KSharedPtr<KUserPrivate> d;
TDESharedPtr<KUserPrivate> d;
void fillPasswd(struct passwd* p);
void fillName(const char* name);
};
@@ -375,7 +375,7 @@ public:
static TQStringList allGroupNames();
private:
KSharedPtr<KUserGroupPrivate> d;
TDESharedPtr<KUserGroupPrivate> d;
void fillGroup(struct group* g);
void fillName(const char* name);
};

+ 8
- 8
tdecore/tdeconfig.cpp View File

@@ -328,14 +328,14 @@ TDEConfig* TDEConfig::copyTo(const TQString &file, TDEConfig *config) const
void TDEConfig::virtual_hook( int id, void* data )
{ TDEConfigBase::virtual_hook( id, data ); }

static KStaticDeleter< TQValueList<KSharedConfig*> > sd;
TQValueList<KSharedConfig*> *KSharedConfig::s_list = 0;
static KStaticDeleter< TQValueList<TDESharedConfig*> > sd;
TQValueList<TDESharedConfig*> *TDESharedConfig::s_list = 0;

KSharedConfig::Ptr KSharedConfig::openConfig(const TQString& fileName, bool readOnly, bool useKDEGlobals )
TDESharedConfig::Ptr TDESharedConfig::openConfig(const TQString& fileName, bool readOnly, bool useKDEGlobals )
{
if (s_list)
{
for(TQValueList<KSharedConfig*>::ConstIterator it = s_list->begin();
for(TQValueList<TDESharedConfig*>::ConstIterator it = s_list->begin();
it != s_list->end(); ++it)
{
if ((*it)->backEnd->fileName() == fileName &&
@@ -344,21 +344,21 @@ KSharedConfig::Ptr KSharedConfig::openConfig(const TQString& fileName, bool read
return (*it);
}
}
return new KSharedConfig(fileName, readOnly, useKDEGlobals);
return new TDESharedConfig(fileName, readOnly, useKDEGlobals);
}

KSharedConfig::KSharedConfig( const TQString& fileName, bool readonly, bool usekdeglobals)
TDESharedConfig::TDESharedConfig( const TQString& fileName, bool readonly, bool usekdeglobals)
: TDEConfig(fileName, readonly, usekdeglobals)
{
if (!s_list)
{
sd.setObject(s_list, new TQValueList<KSharedConfig*>);
sd.setObject(s_list, new TQValueList<TDESharedConfig*>);
}

s_list->append(this);
}

KSharedConfig::~KSharedConfig()
TDESharedConfig::~TDESharedConfig()
{
if ( s_list )
s_list->remove(this);

+ 8
- 8
tdecore/tdeconfig.h View File

@@ -267,14 +267,14 @@ private:
/**
* TDEConfig variant using shared memory
*
* KSharedConfig provides a reference counted, shared memory variant
* TDESharedConfig provides a reference counted, shared memory variant
* of TDEConfig.
*/
class TDECORE_EXPORT KSharedConfig : public TDEConfig, public KShared
class TDECORE_EXPORT TDESharedConfig : public TDEConfig, public TDEShared
{
friend class TQValueList<KSharedConfig*>;
friend class TQValueList<TDESharedConfig*>;
public:
typedef KSharedPtr<KSharedConfig> Ptr;
typedef TDESharedPtr<TDESharedConfig> Ptr;

public:
/**
@@ -283,14 +283,14 @@ public:
* @param readOnly set the config object's read-only status
* @param bUseKDEGlobals Toggle reading the global KDE configuration file.
*/
static KSharedConfig::Ptr openConfig(const TQString& fileName, bool readOnly = false,
static TDESharedConfig::Ptr openConfig(const TQString& fileName, bool readOnly = false,
bool bUseKDEGlobals = true);

private:
KSharedConfig( const TQString& fileName, bool readOnly, bool useKDEGlobals );
~KSharedConfig();
TDESharedConfig( const TQString& fileName, bool readOnly, bool useKDEGlobals );
~TDESharedConfig();

static TQValueList<KSharedConfig*> *s_list;
static TQValueList<TDESharedConfig*> *s_list;
};

#endif

+ 2
- 2
tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp View File

@@ -1220,7 +1220,7 @@ int main( int argc, char **argv )
if ( !singleton ) {
h << " " << className << "(";
if (cfgFileNameArg)
h << " KSharedConfig::Ptr config" << (parameters.isEmpty() ? " = TDEGlobal::sharedConfig()" : ", ");
h << " TDESharedConfig::Ptr config" << (parameters.isEmpty() ? " = TDEGlobal::sharedConfig()" : ", ");
for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
@@ -1502,7 +1502,7 @@ int main( int argc, char **argv )
cpp << className << "::" << className << "( ";
if ( cfgFileNameArg ) {
if ( !singleton )
cpp << " KSharedConfig::Ptr config";
cpp << " TDESharedConfig::Ptr config";
else
cpp << " const char *config";
cpp << (parameters.isEmpty() ? " " : ", ");

+ 1
- 1
tdecore/tdeconfig_compiler/tests/test8a.cpp.ref View File

@@ -3,7 +3,7 @@

#include "test8a.h"

Test8a::Test8a( KSharedConfig::Ptr config )
Test8a::Test8a( TDESharedConfig::Ptr config )
: TDEConfigSkeleton( config )
{
setCurrentGroup( TQString::fromLatin1( "Group" ) );

+ 1
- 1
tdecore/tdeconfig_compiler/tests/test8a.h.ref View File

@@ -11,7 +11,7 @@ class Test8a : public TDEConfigSkeleton
{
public:

Test8a( KSharedConfig::Ptr config = TDEGlobal::sharedConfig() );
Test8a( TDESharedConfig::Ptr config = TDEGlobal::sharedConfig() );
~Test8a();

/**

+ 1
- 1
tdecore/tdeconfig_compiler/tests/test8main.cpp View File

@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
TDEInstance i("test");
Test8a *config1 = new Test8a( KSharedConfig::openConfig( TQString::null ) );
Test8a *config1 = new Test8a( TDESharedConfig::openConfig( TQString::null ) );
Test8a *config2 = new Test8a();
Test8b::self();
delete config1;

+ 1
- 1
tdecore/tdeconfigbackend.h View File

@@ -48,7 +48,7 @@ class TDEConfigBackEndPrivate;
class TDECORE_EXPORT TDEConfigBackEnd
{
friend class TDEConfig;
friend class KSharedConfig;
friend class TDESharedConfig;
public:
/**
* Constructs a configuration back end.

+ 2
- 2
tdecore/tdeconfigbase.h View File

@@ -46,7 +46,7 @@ class TDEConfigGroup;
* abstract base class, meaning that you cannot directly instantiate
* objects of this class. Either use TDEConfig (for usual %KDE
* configuration) or KSimpleConfig (for special needs as in ksamba), or
* even KSharedConfig (stores values in shared memory).
* even TDESharedConfig (stores values in shared memory).
*
* All configuration entries are key, value pairs. Each entry also
* belongs to a specific group of related entries. All configuration
@@ -65,7 +65,7 @@ class TDEConfigGroup;
* @see TDEGlobal#config()
* @see TDEConfig
* @see KSimpleConfig
* @see KSharedConfig
* @see TDESharedConfig
*/
class TDECORE_EXPORT TDEConfigBase : public TQObject
{

+ 2
- 2
tdecore/tdeconfigskeleton.cpp View File

@@ -885,7 +885,7 @@ TDEConfigSkeleton::TDEConfigSkeleton( const TQString &configname )

if ( !configname.isEmpty() )
{
mConfig = KSharedConfig::openConfig( configname );
mConfig = TDESharedConfig::openConfig( configname );
}
else
{
@@ -893,7 +893,7 @@ TDEConfigSkeleton::TDEConfigSkeleton( const TQString &configname )
}
}

TDEConfigSkeleton::TDEConfigSkeleton(KSharedConfig::Ptr config)
TDEConfigSkeleton::TDEConfigSkeleton(TDESharedConfig::Ptr config)
: mCurrentGroup( "No Group" ), mUseDefaults(false)
{
kdDebug(177) << "Creating TDEConfigSkeleton (" << (void *)this << ")" << endl;

+ 2
- 2
tdecore/tdeconfigskeleton.h View File

@@ -800,7 +800,7 @@ public:
*
* @param config configuration object to use.
*/
TDEConfigSkeleton(KSharedConfig::Ptr config);
TDEConfigSkeleton(TDESharedConfig::Ptr config);

/**
* Destructor
@@ -1215,7 +1215,7 @@ protected:
private:
TQString mCurrentGroup;

KSharedConfig::Ptr mConfig; // pointer to TDEConfig object
TDESharedConfig::Ptr mConfig; // pointer to TDEConfig object

TDEConfigSkeletonItem::List mItems;
TDEConfigSkeletonItem::Dict mItemDict;

+ 2
- 2
tdecore/tdesycocaentry.h View File

@@ -34,7 +34,7 @@ class TQDataStream;
* @internal
* @see http://developer.kde.org/documentation/library/kdeqt/trinityarch/tdesycoca.html
*/
class TDECORE_EXPORT KSycocaEntry : public KShared
class TDECORE_EXPORT KSycocaEntry : public TDEShared
{
public:
@@ -42,7 +42,7 @@ public:
virtual KSycocaType sycocaType() const { return KST_KSycocaEntry; }

public:
typedef KSharedPtr<KSycocaEntry> Ptr;
typedef TDESharedPtr<KSycocaEntry> Ptr;
typedef TQValueList<Ptr> List;
public: // KDoc seems to barf on those typedefs and generates no docs after them
/**

+ 1
- 1
tdecore/tdesycocafactory.cpp View File

@@ -26,7 +26,7 @@
#include <kdebug.h>

template class TQDict<KSycocaEntry>;
template class TQDict<KSharedPtr<KSycocaEntry> >;
template class TQDict<TDESharedPtr<KSycocaEntry> >;

KSycocaFactory::KSycocaFactory(KSycocaFactoryId factory_id)
: m_resourceList(0), m_entryDict(0), m_sycocaDict(0)

+ 1
- 1
tdeio/tdeio/kimageiofactory.h View File

@@ -20,7 +20,7 @@ class TDEIO_EXPORT KImageIOFormat : public KSycocaEntry
K_SYCOCATYPE( KST_KImageIOFormat, KSycocaEntry )

public:
typedef KSharedPtr<KImageIOFormat> Ptr;
typedef TDESharedPtr<KImageIOFormat> Ptr;
typedef TQValueList<Ptr> List;
public: // KDoc seems to barf on those typedefs and generates no docs after them
/**

+ 1
- 1
tdeio/tdeio/kmimetype.cpp View File

@@ -59,7 +59,7 @@
#include <tdesycoca.h>
#include <kde_file.h>

template class KSharedPtr<KMimeType>;
template class TDESharedPtr<KMimeType>;
template class TQValueList<KMimeType::Ptr>;

KMimeType::Ptr KMimeType::s_pDefaultType = 0L;

+ 1
- 1
tdeio/tdeio/kmimetype.h View File

@@ -49,7 +49,7 @@ class TDEIO_EXPORT KMimeType : public KServiceType
K_SYCOCATYPE( KST_KMimeType, KServiceType )

public:
typedef KSharedPtr<KMimeType> Ptr;
typedef TDESharedPtr<KMimeType> Ptr;
typedef TQValueList<Ptr> List;
public:
/**

+ 1
- 1
tdeio/tdeio/kprotocolinfo.h View File

@@ -47,7 +47,7 @@ class TDEIO_EXPORT KProtocolInfo : public KSycocaEntry
K_SYCOCATYPE( KST_KProtocolInfo, KSycocaEntry )

public:
typedef KSharedPtr<KProtocolInfo> Ptr;
typedef TDESharedPtr<KProtocolInfo> Ptr;

public:
/**

+ 1
- 1
tdeio/tdeio/kservice.h View File

@@ -52,7 +52,7 @@ class TDEIO_EXPORT KService : public KSycocaEntry
friend class KBuildSycoca;

public:
typedef KSharedPtr<KService> Ptr;
typedef TDESharedPtr<KService> Ptr;
typedef TQValueList<Ptr> List;
public:
/**

+ 3
- 3
tdeio/tdeio/kservicegroup.h View File

@@ -71,8 +71,8 @@ class TDEIO_EXPORT KServiceGroup : public KSycocaEntry
K_SYCOCATYPE( KST_KServiceGroup, KSycocaEntry )

public:
typedef KSharedPtr<KServiceGroup> Ptr;
typedef KSharedPtr<KSycocaEntry> SPtr;
typedef TDESharedPtr<KServiceGroup> Ptr;
typedef TDESharedPtr<KSycocaEntry> SPtr;
typedef TQValueList<SPtr> List;
public:
/**
@@ -332,7 +332,7 @@ class TDEIO_EXPORT KServiceSeparator : public KSycocaEntry
K_SYCOCATYPE( KST_KServiceSeparator, KSycocaEntry )

public:
typedef KSharedPtr<KServiceSeparator> Ptr;
typedef TDESharedPtr<KServiceSeparator> Ptr;
public:
/**
* Construct a service separator

+ 1
- 1
tdeio/tdeio/kservicetype.h View File

@@ -47,7 +47,7 @@ class TDEIO_EXPORT KServiceType : public KSycocaEntry
K_SYCOCATYPE( KST_KServiceType, KSycocaEntry )

public:
typedef KSharedPtr<KServiceType> Ptr;
typedef TDESharedPtr<KServiceType> Ptr;
typedef TQValueList<Ptr> List;
public:


+ 2
- 2
tdeio/tdeio/ktraderparsetree.h View File

@@ -120,10 +120,10 @@ public:
/**
* @internal
*/
class TDEIO_EXPORT ParseTreeBase : public KShared
class TDEIO_EXPORT ParseTreeBase : public TDEShared
{
public:
typedef KSharedPtr<ParseTreeBase> Ptr;
typedef TDESharedPtr<ParseTreeBase> Ptr;
ParseTreeBase() { }

virtual bool eval( ParseContext *_context ) const = 0;

+ 1
- 1
tdeio/tdeio/tdefilemetainfo.h View File

@@ -1698,7 +1698,7 @@ private:
KFilePlugin* plugin;
KFileMimeTypeInfo* mimeTypeInfo;
// The problem here is that plugin can be shared in multiple instances,
// so the memory management isn't easy. KDE4 solution: use KSharedPtr?
// so the memory management isn't easy. KDE4 solution: use TDESharedPtr?
// For now we flag one copy of the KFilePlugin pointer as being "owned".
bool ownsPlugin;
};

+ 4
- 4
tderesources/configpage.cpp View File

@@ -45,7 +45,7 @@

namespace KRES {

ResourcePageInfo::ResourcePageInfo() : KShared() {
ResourcePageInfo::ResourcePageInfo() : TDEShared() {
mManager = 0L;
mConfig = 0L;
}
@@ -153,7 +153,7 @@ ConfigPage::ConfigPage( TQWidget *parent, const char *name )

ConfigPage::~ConfigPage()
{
TQValueList<KSharedPtr<ResourcePageInfo> >::Iterator it;
TQValueList<TDESharedPtr<ResourcePageInfo> >::Iterator it;
for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) {
(*it)->mManager->removeObserver( this );
}
@@ -226,7 +226,7 @@ void ConfigPage::loadManager( const TQString& family )
info->mConfig = new TDEConfig( KRES::ManagerImpl::defaultConfigFile( family ) );
info->mManager->readConfig( info->mConfig );

mInfoMap.append( KSharedPtr<ResourcePageInfo>(info) );
mInfoMap.append( TDESharedPtr<ResourcePageInfo>(info) );
}
}

@@ -234,7 +234,7 @@ void ConfigPage::save()
{
saveResourceSettings();

TQValueList<KSharedPtr<ResourcePageInfo> >::Iterator it;
TQValueList<TDESharedPtr<ResourcePageInfo> >::Iterator it;
for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it )
(*it)->mManager->writeConfig( (*it)->mConfig );


+ 2
- 2
tderesources/configpage.h View File

@@ -37,7 +37,7 @@ class TQPushButton;

namespace KRES {

class TDERESOURCES_EXPORT ResourcePageInfo : public KShared
class TDERESOURCES_EXPORT ResourcePageInfo : public TDEShared
{
public:
ResourcePageInfo();
@@ -93,7 +93,7 @@ class TDERESOURCES_EXPORT ConfigPage : public TQWidget, public ManagerObserver<R
TDEConfig* mConfig;
TQString mFamily;
TQStringList mFamilyMap;
TQValueList<KSharedPtr<ResourcePageInfo> > mInfoMap;
TQValueList<TDESharedPtr<ResourcePageInfo> > mInfoMap;

KComboBox* mFamilyCombo;
KListView* mListView;

+ 1
- 1
tdespell2/README View File

@@ -9,7 +9,7 @@ Dictionaries are abstracted in the KSpell::Dictionary object which
encapsulates all spell-checking functionality.

You'll notice that the Broker is being created via the
Broker::Ptr Broker::openBroker( KSharedConfig *config =0 );
Broker::Ptr Broker::openBroker( TDESharedConfig *config =0 );
call. The Broker is a shared object and the reason for this construct
is very simple:
- most application would need to have a few Broker objects (one for

+ 5
- 5
tdespell2/broker.cpp View File

@@ -56,11 +56,11 @@ public:

TQPtrDict<Broker> *Broker::s_brokers = 0;

Broker *Broker::openBroker( KSharedConfig *config )
Broker *Broker::openBroker( TDESharedConfig *config )
{
KSharedConfig::Ptr preventDeletion;
TDESharedConfig::Ptr preventDeletion;
if ( !config ) {
preventDeletion = KSharedConfig::openConfig( DEFAULT_CONFIG_FILE );
preventDeletion = TDESharedConfig::openConfig( DEFAULT_CONFIG_FILE );
} else
preventDeletion = config;

@@ -74,9 +74,9 @@ Broker *Broker::openBroker( KSharedConfig *config )
return broker;
}

Broker::Broker( KSharedConfig *config )
Broker::Broker( TDESharedConfig *config )
{
KSharedConfig::Ptr preventDeletion( config );
TDESharedConfig::Ptr preventDeletion( config );
Q_UNUSED( preventDeletion );

if ( !s_brokers )

+ 5
- 5
tdespell2/broker.h View File

@@ -28,7 +28,7 @@
#include <tqstringlist.h>
#include <tqstring.h>

class KSharedConfig;
class TDESharedConfig;
template <typename T>
class TQPtrDict;

@@ -46,11 +46,11 @@ namespace KSpell2
* of the KSpell2 architecture.
*/
class KDE_EXPORT Broker : public TQObject,
public KShared
public TDEShared
{
Q_OBJECT
public:
typedef KSharedPtr<Broker> Ptr;
typedef TDESharedPtr<Broker> Ptr;
/**
* Constructs the broker.
*
@@ -65,7 +65,7 @@ namespace KSpell2
* and default client values. If no value will
* be passed Broker will use global tdespellrc file.
*/
static Broker *openBroker( KSharedConfig *config = 0 );
static Broker *openBroker( TDESharedConfig *config = 0 );

public:
~Broker();
@@ -122,7 +122,7 @@ namespace KSpell2
friend class Settings;
void changed();
private:
Broker( KSharedConfig *config );
Broker( TDESharedConfig *config );
void loadPlugins();
void loadPlugin( const TQString& );
private:

+ 3
- 3
tdespell2/settings.cpp View File

@@ -37,7 +37,7 @@ class Settings::Private
{
public:
Broker* broker; //can't be a Ptr since we don't want to hold a ref on it
KSharedConfig::Ptr config;
TDESharedConfig::Ptr config;
bool modified;

TQString defaultLanguage;
@@ -50,7 +50,7 @@ public:
TQMap<TQString, bool> ignore;
};

Settings::Settings( Broker *broker, KSharedConfig *config )
Settings::Settings( Broker *broker, TDESharedConfig *config )
{
d = new Private;
d->broker = broker;
@@ -67,7 +67,7 @@ Settings::~Settings()
delete d; d = 0;
}

KSharedConfig *Settings::sharedConfig() const
TDESharedConfig *Settings::sharedConfig() const
{
return d->config;
}

+ 3
- 3
tdespell2/settings.h View File

@@ -26,7 +26,7 @@
#include <tqstring.h>
#include <tdelibs_export.h>

class KSharedConfig;
class TDESharedConfig;

namespace KSpell2
{
@@ -59,7 +59,7 @@ namespace KSpell2

void save();

KSharedConfig *sharedConfig() const;
TDESharedConfig *sharedConfig() const;

private:
void loadConfig();
@@ -68,7 +68,7 @@ namespace KSpell2

private:
friend class Broker;
Settings( Broker *broker, KSharedConfig *config );
Settings( Broker *broker, TDESharedConfig *config );
private:
class Private;
Private *d;

+ 1
- 1
tdespell2/ui/highlighter.cpp View File

@@ -51,7 +51,7 @@ Highlighter::Highlighter( TQTextEdit *textEdit,
d = new Private;
d->filter = filter;
if ( !configFile.isEmpty() )
d->broker = Broker::openBroker( KSharedConfig::openConfig( configFile ) );
d->broker = Broker::openBroker( TDESharedConfig::openConfig( configFile ) );
else
d->broker = Broker::openBroker();


+ 3
- 3
tdeui/kpanelapplet.cpp View File

@@ -37,7 +37,7 @@ public:
{}

const TQPopupMenu* customMenu;
KSharedConfig::Ptr sharedConfig;
TDESharedConfig::Ptr sharedConfig;
TQPtrList<TQObject> watchedForFocus;
bool hasFocus;
};
@@ -60,7 +60,7 @@ KPanelApplet::KPanelApplet(const TQString& configFile, Type type,
}
setBackgroundOrigin( AncestorOrigin );

d->sharedConfig = KSharedConfig::openConfig(configFile, kapp && kapp->config()->isImmutable());
d->sharedConfig = TDESharedConfig::openConfig(configFile, kapp && kapp->config()->isImmutable());
_config = d->sharedConfig;
}

@@ -188,7 +188,7 @@ bool KPanelApplet::eventFilter(TQObject *o, TQEvent * e)
return TQFrame::eventFilter(o, e);
}

KSharedConfig::Ptr KPanelApplet::sharedConfig() const
TDESharedConfig::Ptr KPanelApplet::sharedConfig() const
{
return d->sharedConfig;
}

+ 1
- 1
tdeui/kpanelapplet.h View File

@@ -185,7 +185,7 @@ public:
* called \<appletname\>\<instanceid\>rc in the user's local %KDE directory.
**/
TDEConfig* config() const { return _config; }
KSharedConfig::Ptr sharedConfig() const;
TDESharedConfig::Ptr sharedConfig() const;

/**
* @return Type indicating the applet's type.

+ 3
- 3
tdeui/krootpixmap.cpp View File

@@ -61,7 +61,7 @@ void KRootPixmap::init()
m_Fade = 0;
m_BlurRadius = 0;
m_BlurSigma = 0;
m_pPixmap = new KSharedPixmap; //ordinary KPixmap on win32
m_pPixmap = new TDESharedPixmap; //ordinary KPixmap on win32
m_pTimer = new TQTimer( this );
m_bInit = false;
m_bActive = false;
@@ -238,7 +238,7 @@ void KRootPixmap::repaint(bool force)
m_Desk = currentDesktop();
}

// KSharedPixmap will correctly generate a tile for us.
// TDESharedPixmap will correctly generate a tile for us.
m_pPixmap->loadFromShared(pixmapName(m_Desk), m_Rect);
#else
m_Desk = currentDesktop();
@@ -308,7 +308,7 @@ void KRootPixmap::slotDone(bool success)
updateBackground( m_pPixmap );
}

void KRootPixmap::updateBackground( KSharedPixmap *spm )
void KRootPixmap::updateBackground( TDESharedPixmap *spm )
{
TQPixmap pm = *spm;


+ 5
- 5
tdeui/krootpixmap.h View File

@@ -20,7 +20,7 @@
class TQRect;
class TQWidget;
class TQTimer;
class KSharedPixmap;
class TDESharedPixmap;
class KRootPixmapData;

/**
@@ -37,7 +37,7 @@ class KRootPixmapData;
* Instead of using the default behavior, you can ask KRootPixmap
* to emit a backgroundUpdated(const TQPixmap &) signal whenever
* the background needs updating by using setCustomPainting(bool).
* Alternatively by reimplementing updateBackground(KSharedPixmap*)
* Alternatively by reimplementing updateBackground(TDESharedPixmap*)
* you can take complete control of the behavior.
*
* @author Geert Jansen <jansen@kde.org>
@@ -179,7 +179,7 @@ public slots:
void setCustomPainting( bool enable ) { m_bCustomPaint = enable; }

/**
* Asks KDesktop to export the desktop background as a KSharedPixmap.
* Asks KDesktop to export the desktop background as a TDESharedPixmap.
* This method uses DCOP to call KBackgroundIface/setExport(int).
*/
void enableExports();
@@ -209,7 +209,7 @@ protected:
* applies the fade effect, then sets the target's background, or emits
* backgroundUpdated(const TQPixmap &) depending on the painting mode.
*/
virtual void updateBackground( KSharedPixmap * );
virtual void updateBackground( TDESharedPixmap * );

private slots:
void slotBackgroundChanged(int);
@@ -229,7 +229,7 @@ private:
TQRect m_Rect;
TQWidget *m_pWidget;
TQTimer *m_pTimer;
KSharedPixmap *m_pPixmap;
TDESharedPixmap *m_pPixmap;
KRootPixmapData *d;

void init();

+ 9
- 9
tdeui/ksharedpixmap.cpp View File

@@ -49,10 +49,10 @@
#undef FocusOut

/**
* KSharedPixmap
* TDESharedPixmap
*/

class KSharedPixmapPrivate
class TDESharedPixmapPrivate
{
public:
Atom pixmap;
@@ -61,21 +61,21 @@ public:
TQRect rect;
};

KSharedPixmap::KSharedPixmap()
TDESharedPixmap::TDESharedPixmap()
: TQWidget(0L, "shpixmap comm window")
{
d = new KSharedPixmapPrivate;
d = new TDESharedPixmapPrivate;
init();
}


KSharedPixmap::~KSharedPixmap()
TDESharedPixmap::~TDESharedPixmap()
{
delete d;
}


void KSharedPixmap::init()
void TDESharedPixmap::init()
{
d->pixmap = XInternAtom(tqt_xdisplay(), "PIXMAP", false);
TQCString atom;
@@ -85,7 +85,7 @@ void KSharedPixmap::init()
}


bool KSharedPixmap::isAvailable(const TQString & name) const
bool TDESharedPixmap::isAvailable(const TQString & name) const
{
TQString str = TQString("KDESHPIXMAP:%1").arg(name);
Atom sel = XInternAtom(tqt_xdisplay(), str.latin1(), true);
@@ -95,7 +95,7 @@ bool KSharedPixmap::isAvailable(const TQString & name) const
}


bool KSharedPixmap::loadFromShared(const TQString & name, const TQRect & rect)
bool TDESharedPixmap::loadFromShared(const TQString & name, const TQRect & rect)
{
d->rect = rect;
if (d->selection != None)
@@ -120,7 +120,7 @@ bool KSharedPixmap::loadFromShared(const TQString & name, const TQRect & rect)
}


bool KSharedPixmap::x11Event(XEvent *event)
bool TDESharedPixmap::x11Event(XEvent *event)
{
if (event->type != SelectionNotify)
return false;

+ 11
- 11
tdeui/ksharedpixmap.h View File

@@ -11,8 +11,8 @@
* version 2 of the License, or (at your option) any later version.
*/

#ifndef __KSharedPixmap_h_Included__
#define __KSharedPixmap_h_Included__
#ifndef __TDESharedPixmap_h_Included__
#define __TDESharedPixmap_h_Included__

#include <kpixmap.h>

@@ -26,7 +26,7 @@
#include <tqpixmap.h>
#include <tqwidget.h>

class KSharedPixmapPrivate;
class TDESharedPixmapPrivate;

/**
* Shared pixmap client.
@@ -35,7 +35,7 @@ class KSharedPixmapPrivate;
* by a global id string, and can be accessed by all X clients.
*
* This class is a client class to shared pixmaps in KDE. You can use it
* to copy (a part of) a shared pixmap into. KSharedPixmap inherits KPixmap
* to copy (a part of) a shared pixmap into. TDESharedPixmap inherits KPixmap
* for that purpose.
*
* The server part of shared pixmaps is not implemented here.
@@ -44,7 +44,7 @@ class KSharedPixmapPrivate;
*
* An example: copy from a shared pixmap:
* \code
* KSharedPixmap *pm = new KSharedPixmap;
* TDESharedPixmap *pm = new TDESharedPixmap;
* connect(pm, TQT_SIGNAL(done(bool)), TQT_SLOT(slotDone(bool)));
* pm->loadFromShared("My Pixmap");
* \endcode
@@ -53,7 +53,7 @@ class KSharedPixmapPrivate;
* @version $Id$
*
*/
class TDEUI_EXPORT KSharedPixmap:
class TDEUI_EXPORT TDESharedPixmap:
public TQWidget,
public KPixmap
{
@@ -65,12 +65,12 @@ public:
/**
* Construct an empty pixmap.
*/
KSharedPixmap();
TDESharedPixmap();

/**
* Destroys the pixmap.
*/
~KSharedPixmap();
~TDESharedPixmap();

/**
* Load from a shared pixmap reference. The signal done() is emitted
@@ -80,7 +80,7 @@ public:
* @param rect If you pass a nonzero rectangle, a tile is generated which
* is able to fill up the specified rectangle completely. This is solely
* for optimization: in some cases the tile will be much smaller than the
* original pixmap. It reflects KSharedPixmap's original use: sharing
* original pixmap. It reflects TDESharedPixmap's original use: sharing
* of the desktop background to achieve pseudo transparency.
* @return True if the shared pixmap exists and loading has started
* successfully, false otherwise.
@@ -110,11 +110,11 @@ private:
bool copy(const TQString & id, const TQRect & rect);
void init();

KSharedPixmapPrivate *d;
TDESharedPixmapPrivate *d;
};
#else // WIN32, Qt Embedded
// Let's simply assume KPixmap will do for now. Yes, I know that's broken.
#define KSharedPixmap KPixmap
#define TDESharedPixmap KPixmap
#endif

#endif

+ 1
- 1
tdeutils/tdecmoduleinfo.h View File

@@ -132,7 +132,7 @@ public:
// changed from name() to avoid ambiguity with TQObject::name() on multiple inheritance

/**
* @return a KSharedPtr to KService created from the modules .desktop file
* @return a TDESharedPtr to KService created from the modules .desktop file
*/
KService::Ptr service() const { return _service; }


Loading…
Cancel
Save