Rename KShared

pull/1/head
Timothy Pearson 12 years ago
parent c64839178e
commit 8f78d8aa94

@ -139,7 +139,7 @@ fixes for gcc2.96 compatiblility
2002/3/11 11:01:00 jim 2002/3/11 11:01:00 jim
3.0beta1: versioning to KDE3.0beta2; mapped types 3.0beta1: versioning to KDE3.0beta2; mapped types
for KSharedPtr descendants; KParts modified - now for TDESharedPtr descendants; KParts modified - now
works; KTrader added; support for long long added; works; KTrader added; support for long long added;
created PyKDE2generic and revised build system; created PyKDE2generic and revised build system;
new examples; removed inaccessible member classes; new examples; removed inaccessible member classes;

@ -68,7 +68,7 @@ Jonathan Gardner, Hans-Peter Janssen, Marc Schmitt
(let me know if I've left out any names) (let me know if I've left out any names)
Daniel Naber Daniel Naber
For bug reports and testing (KSharedPtr related) For bug reports and testing (TDESharedPtr related)
Roberto Alsina Roberto Alsina
For an interim KDE3.1.1 compatible release For an interim KDE3.1.1 compatible release

@ -144,7 +144,7 @@ postProcess = {
["-p ", "tdecore", "-o", "fixSignal", "tdecorepart0.*"]], ["-p ", "tdecore", "-o", "fixSignal", "tdecorepart0.*"]],
# "tdesu": None, # "tdesu": None,
"tdefx": None, "tdefx": None,
"tdeui": None, #[["-p ", "tdeui", "-o", "shpix", "siptdeuiKSharedPixmap.cpp"]], "tdeui": None, #[["-p ", "tdeui", "-o", "shpix", "siptdeuiTDESharedPixmap.cpp"]],
"tderesources": None, "tderesources": None,
"kabc": None, "kabc": None,
"kio": None, "kio": None,

@ -680,8 +680,8 @@
<tr ><td><a href="tdeio/KServiceType.html">KServiceType</A></td></tr> <tr ><td><a href="tdeio/KServiceType.html">KServiceType</A></td></tr>
<tr ><td><a href="tdeio/KServiceTypeProfile.html">KServiceTypeProfile</A></td></tr> <tr ><td><a href="tdeio/KServiceTypeProfile.html">KServiceTypeProfile</A></td></tr>
<tr ><td><a href="tdecore/KSessionManaged.html">KSessionManaged</A></td></tr> <tr ><td><a href="tdecore/KSessionManaged.html">KSessionManaged</A></td></tr>
<tr ><td><a href="tdecore/KShared.html">KShared</A></td></tr> <tr ><td><a href="tdecore/TDEShared.html">TDEShared</A></td></tr>
<tr ><td><a href="tdecore/KSharedConfig.html">KSharedConfig</A></td></tr> <tr ><td><a href="tdecore/TDESharedConfig.html">TDESharedConfig</A></td></tr>
<tr ><td><a href="tdecore/KShell.html">KShell</A></td></tr> <tr ><td><a href="tdecore/KShell.html">KShell</A></td></tr>
<tr ><td><a href="tdeio/KShellCompletion.html">KShellCompletion</A></td></tr> <tr ><td><a href="tdeio/KShellCompletion.html">KShellCompletion</A></td></tr>
<tr ><td><a href="tdecore/KShellProcess.html">KShellProcess</A></td></tr> <tr ><td><a href="tdecore/KShellProcess.html">KShellProcess</A></td></tr>

@ -31,7 +31,7 @@
<td>KSycocaEntry <a href = "sip/glossary.html#abstract">(<i>abstract</i>)</a></td> <td>KSycocaEntry <a href = "sip/glossary.html#abstract">(<i>abstract</i>)</a></td>
</tr> </tr>
<tr><td>Inherits</td> <tr><td>Inherits</td>
<td>KShared </td> <td>TDEShared </td>
</tr> </tr>
</table> </table>
<h3>methods</h3><ul> <h3>methods</h3><ul>

@ -31,7 +31,7 @@
<td>KLockFile</td> <td>KLockFile</td>
</tr> </tr>
<tr><td>Inherits</td> <tr><td>Inherits</td>
<td>KShared </td> <td>TDEShared </td>
</tr> </tr>
</table> </table>
<h3>enums</h3><ul> <h3>enums</h3><ul>

@ -31,7 +31,7 @@
<td>KMountPoint</td> <td>KMountPoint</td>
</tr> </tr>
<tr><td>Inherits</td> <tr><td>Inherits</td>
<td>KShared </td> <td>TDEShared </td>
</tr> </tr>
</table> </table>
<h3>enums</h3><ul> <h3>enums</h3><ul>

@ -3,7 +3,7 @@
"http://www.w3.org/TR/html4/loose.dtd""> "http://www.w3.org/TR/html4/loose.dtd"">
<html> <html>
<head> <head>
<title>class KShared</title> <title>class TDEShared</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="wabbit dumphtml"> <meta name="GENERATOR" content="wabbit dumphtml">
</head> </head>
@ -12,7 +12,7 @@
<hr> <hr>
<table width="100%"><tr> <table width="100%"><tr>
<td width ="70%"> <td width ="70%">
<h1>class KShared</h1><hr> <h1>class TDEShared</h1><hr>
</td> </td>
<td width="30%" valign="top" align="right"> <td width="30%" valign="top" align="right">
<table> <table>
@ -28,32 +28,32 @@
<td width="30%" align=left>tdecore</td> <td width="30%" align=left>tdecore</td>
</tr> </tr>
<tr><td>Class</td> <tr><td>Class</td>
<td>KShared</td> <td>TDEShared</td>
</tr> </tr>
<tr><td>Inherits</td> <tr><td>Inherits</td>
<td> </td> <td> </td>
</tr> </tr>
</table> </table>
<h3>methods</h3><ul> <h3>methods</h3><ul>
<li><b>KShared</b> () <li><b>TDEShared</b> ()
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>a KShared instance</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>a TDEShared instance</i></td></tr>
</table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>KShared</b> (a0) <li><b>TDEShared</b> (a0)
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>a KShared instance</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>a TDEShared instance</i></td></tr>
</table><table><tr bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr> </table><table><tr bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr>
<tr><td>a0</td><td>KShared</td><td></td></tr> <tr><td>a0</td><td>TDEShared</td><td></td></tr>
</table> </table>
</td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>_KShared_count</b> () <li><b>_TDEShared_count</b> ()
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(int)</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(int)</i></td></tr>
</table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>_KShared_ref</b> () <li><b>_TDEShared_ref</b> ()
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>nothing</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>nothing</i></td></tr>
</table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>_KShared_unref</b> () <li><b>_TDEShared_unref</b> ()
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>nothing</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>nothing</i></td></tr>
</table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>~KShared</b> () <li><b>~TDEShared</b> ()
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>nothing</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>nothing</i></td></tr>
</table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
</ul> </ul>

@ -3,7 +3,7 @@
"http://www.w3.org/TR/html4/loose.dtd""> "http://www.w3.org/TR/html4/loose.dtd"">
<html> <html>
<head> <head>
<title>class KSharedConfig</title> <title>class TDESharedConfig</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="wabbit dumphtml"> <meta name="GENERATOR" content="wabbit dumphtml">
</head> </head>
@ -12,7 +12,7 @@
<hr> <hr>
<table width="100%"><tr> <table width="100%"><tr>
<td width ="70%"> <td width ="70%">
<h1>class KSharedConfig</h1><hr> <h1>class TDESharedConfig</h1><hr>
</td> </td>
<td width="30%" valign="top" align="right"> <td width="30%" valign="top" align="right">
<table> <table>
@ -28,15 +28,15 @@
<td width="30%" align=left>tdecore</td> <td width="30%" align=left>tdecore</td>
</tr> </tr>
<tr><td>Class</td> <tr><td>Class</td>
<td>KSharedConfig</td> <td>TDESharedConfig</td>
</tr> </tr>
<tr><td>Inherits</td> <tr><td>Inherits</td>
<td>TDEConfig, KShared </td> <td>TDEConfig, TDEShared </td>
</tr> </tr>
</table> </table>
<h3>methods</h3><ul> <h3>methods</h3><ul>
<li><b>KSharedConfig</b> (fileName, immutable, useKDEGlobals) <li><b>TDESharedConfig</b> (fileName, immutable, useKDEGlobals)
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>a KSharedConfig instance</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>a TDESharedConfig instance</i></td></tr>
<tr><td>In versions KDE 3.2.0 and above only</td></tr> <tr><td>In versions KDE 3.2.0 and above only</td></tr>
</table><table><tr bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr> </table><table><tr bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr>
<tr><td>fileName</td><td>TQString</td><td></td></tr> <tr><td>fileName</td><td>TQString</td><td></td></tr>
@ -45,7 +45,7 @@
</table> </table>
</td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>openConfig</b> (fileName, immutable = 0, bUseKDEGlobals = 1) <li><b>openConfig</b> (fileName, immutable = 0, bUseKDEGlobals = 1)
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(KSharedConfig.Ptr)</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(TDESharedConfig.Ptr)</i></td></tr>
<tr><td>In versions KDE 3.2.0 and above only</td></tr> <tr><td>In versions KDE 3.2.0 and above only</td></tr>
<tr><td><i>static</i></td></tr> <tr><td><i>static</i></td></tr>
</table><table><tr bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr> </table><table><tr bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr>
@ -54,7 +54,7 @@
<tr><td>bUseKDEGlobals</td><td>bool</td><td>1</td></tr> <tr><td>bUseKDEGlobals</td><td>bool</td><td>1</td></tr>
</table> </table>
</td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>~KSharedConfig</b> () <li><b>~TDESharedConfig</b> ()
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>nothing</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>nothing</i></td></tr>
<tr><td>In versions KDE 3.2.0 and above only</td></tr> <tr><td>In versions KDE 3.2.0 and above only</td></tr>
</table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>

@ -39,7 +39,7 @@
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>a KTimezone instance</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>a KTimezone instance</i></td></tr>
<tr><td>In versions KDE 3.5.0 and above only</td></tr> <tr><td>In versions KDE 3.5.0 and above only</td></tr>
</table><table><tr bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr> </table><table><tr bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr>
<tr><td>db</td><td>KSharedPtr<KTimezoneSource></td><td></td></tr> <tr><td>db</td><td>TDESharedPtr<KTimezoneSource></td><td></td></tr>
<tr><td>name</td><td>TQString</td><td></td></tr> <tr><td>name</td><td>TQString</td><td></td></tr>
<tr><td>countryCode</td><td>TQString</td><td>TQString ()</td></tr> <tr><td>countryCode</td><td>TQString</td><td>TQString ()</td></tr>
<tr><td>latitude</td><td>float</td><td>KTimezone .UNKNOWN</td></tr> <tr><td>latitude</td><td>float</td><td>KTimezone .UNKNOWN</td></tr>

@ -31,7 +31,7 @@
<td>KTimezoneSource</td> <td>KTimezoneSource</td>
</tr> </tr>
<tr><td>Inherits</td> <tr><td>Inherits</td>
<td>KShared </td> <td>TDEShared </td>
</tr> </tr>
</table> </table>
<h3>methods</h3><ul> <h3>methods</h3><ul>

@ -46,7 +46,7 @@
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>a TDEConfigSkeleton instance</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>a TDEConfigSkeleton instance</i></td></tr>
<tr><td>In versions KDE 3.2.0 and above only</td></tr> <tr><td>In versions KDE 3.2.0 and above only</td></tr>
</table><table><tr bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr> </table><table><tr bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr>
<tr><td>config</td><td>KSharedConfig.Ptr</td><td></td></tr> <tr><td>config</td><td>TDESharedConfig.Ptr</td><td></td></tr>
</table> </table>
</td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>addItem</b> (a0, name = TQString .null) <li><b>addItem</b> (a0, name = TQString .null)

@ -82,7 +82,7 @@
</table> </table>
</td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>sharedConfig</b> () <li><b>sharedConfig</b> ()
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(KSharedConfig)</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(TDESharedConfig)</i></td></tr>
<tr><td>In versions KDE 3.2.0 and above only</td></tr> <tr><td>In versions KDE 3.2.0 and above only</td></tr>
<tr><td><i>static</i></td></tr> <tr><td><i>static</i></td></tr>
</table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>

@ -94,7 +94,7 @@
</table> </table>
</td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>sharedConfig</b> () <li><b>sharedConfig</b> ()
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(KSharedConfig)</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(TDESharedConfig)</i></td></tr>
<tr><td>In versions KDE 3.2.0 and above only</td></tr> <tr><td>In versions KDE 3.2.0 and above only</td></tr>
</table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
</ul> </ul>

@ -137,8 +137,8 @@
<tr ><td><a href="KSelectionOwner.html">KSelectionOwner</a></td></tr> <tr ><td><a href="KSelectionOwner.html">KSelectionOwner</a></td></tr>
<tr ><td><a href="KSelectionWatcher.html">KSelectionWatcher</a></td></tr> <tr ><td><a href="KSelectionWatcher.html">KSelectionWatcher</a></td></tr>
<tr ><td><a href="KSessionManaged.html">KSessionManaged</a></td></tr> <tr ><td><a href="KSessionManaged.html">KSessionManaged</a></td></tr>
<tr ><td><a href="KShared.html">KShared</a></td></tr> <tr ><td><a href="TDEShared.html">TDEShared</a></td></tr>
<tr ><td><a href="KSharedConfig.html">KSharedConfig</a></td></tr> <tr ><td><a href="TDESharedConfig.html">TDESharedConfig</a></td></tr>
<tr ><td><a href="KShell.html">KShell</a></td></tr> <tr ><td><a href="KShell.html">KShell</a></td></tr>
<tr ><td><a href="KShellProcess.html">KShellProcess</a></td></tr> <tr ><td><a href="KShellProcess.html">KShellProcess</a></td></tr>
<tr ><td><a href="KShortcut.html">KShortcut</a></td></tr> <tr ><td><a href="KShortcut.html">KShortcut</a></td></tr>

@ -31,7 +31,7 @@
<td>KRES.ResourcePageInfo</td> <td>KRES.ResourcePageInfo</td>
</tr> </tr>
<tr><td>Inherits</td> <tr><td>Inherits</td>
<td>KShared </td> <td>TDEShared </td>
</tr> </tr>
</table> </table>
<h3>methods</h3><ul> <h3>methods</h3><ul>

@ -168,7 +168,7 @@
</table> </table>
</td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>sharedConfig</b> () <li><b>sharedConfig</b> ()
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(KSharedConfig.Ptr)</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(TDESharedConfig.Ptr)</i></td></tr>
<tr><td>In versions KDE 3.2.0 and above only</td></tr> <tr><td>In versions KDE 3.2.0 and above only</td></tr>
</table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>type</b> () <li><b>type</b> ()

@ -3,7 +3,7 @@
"http://www.w3.org/TR/html4/loose.dtd""> "http://www.w3.org/TR/html4/loose.dtd"">
<html> <html>
<head> <head>
<title>class KSharedPixmap</title> <title>class TDESharedPixmap</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="wabbit dumphtml"> <meta name="GENERATOR" content="wabbit dumphtml">
</head> </head>
@ -12,7 +12,7 @@
<hr> <hr>
<table width="100%"><tr> <table width="100%"><tr>
<td width ="70%"> <td width ="70%">
<h1>class KSharedPixmap</h1><hr> <h1>class TDESharedPixmap</h1><hr>
</td> </td>
<td width="30%" valign="top" align="right"> <td width="30%" valign="top" align="right">
<table> <table>
@ -27,15 +27,15 @@
<td width="30%" align=left>tdeui</td> <td width="30%" align=left>tdeui</td>
</tr> </tr>
<tr><td>Class</td> <tr><td>Class</td>
<td>KSharedPixmap</td> <td>TDESharedPixmap</td>
</tr> </tr>
<tr><td>Inherits</td> <tr><td>Inherits</td>
<td>TQWidget, KPixmap </td> <td>TQWidget, KPixmap </td>
</tr> </tr>
</table> </table>
<h3>methods</h3><ul> <h3>methods</h3><ul>
<li><b>KSharedPixmap</b> () <li><b>TDESharedPixmap</b> ()
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>a KSharedPixmap instance</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>a TDESharedPixmap instance</i></td></tr>
</table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr> </table></td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
<li><b>done</b> (success) <li><b>done</b> (success)
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>nothing</i></td></tr> <table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>nothing</i></td></tr>

@ -6,7 +6,7 @@ uisampler.py - demos of most of the tdeui widgets,
including dialogs, menus (KAction, KStdAction, etc) including dialogs, menus (KAction, KStdAction, etc)
widgets, and xml ui definition widgets, and xml ui definition
mimetest.py - tests KSharedPtr related classes/methods mimetest.py - tests TDESharedPtr related classes/methods
such as KMimetype, KService, etc such as KMimetype, KService, etc
menudemo.py menudemo.py

@ -1,5 +1,5 @@
""" """
This program tests/demos some of the KSharedPtr related classes and This program tests/demos some of the TDESharedPtr related classes and
methods (KMimeType, KService, etc). It generally tests the *::List methods (KMimeType, KService, etc). It generally tests the *::List
methods for these classes (eg KService::List) since that also tests methods for these classes (eg KService::List) since that also tests
the *::Ptr mapped type code (eg KService::Ptr) at the same time. the *::Ptr mapped type code (eg KService::Ptr) at the same time.
@ -253,7 +253,7 @@ class KMimeTypeTab (TQWidget):
#-------------------- main ------------------------------------------------ #-------------------- main ------------------------------------------------
description = "Test/demo KSharedPtr related methods/classes" description = "Test/demo TDESharedPtr related methods/classes"
version = "1.0" version = "1.0"
aboutData = TDEAboutData ("", "",\ aboutData = TDEAboutData ("", "",\
version, description, TDEAboutData.License_GPL,\ version, description, TDEAboutData.License_GPL,\

@ -88,8 +88,8 @@ tdecore,KSelectionOwner,,,
tdecore,KSelectionWatcher,,, tdecore,KSelectionWatcher,,,
tdecore,TDEServerSocket,,, tdecore,TDEServerSocket,,,
tdecore,KSessionManaged,,, tdecore,KSessionManaged,,,
tdecore,KShared,,, tdecore,TDEShared,,,
tdecore,KSharedConfig,,, tdecore,TDESharedConfig,,,
tdecore,KShell,,, tdecore,KShell,,,
tdecore,KShellProcess,,, tdecore,KShellProcess,,,
tdecore,KShortcut,,, tdecore,KShortcut,,,

@ -221,7 +221,7 @@ def miscKIntValidator (parent):
def miscKPixmapIO (parent): def miscKPixmapIO (parent):
parent.currentPageObj = PageNotImpl (parent) parent.currentPageObj = PageNotImpl (parent)
def miscKSharedPixmap (parent): def miscTDESharedPixmap (parent):
parent.currentPageObj = PageNotImpl (parent) parent.currentPageObj = PageNotImpl (parent)
def miscKSystemTray (parent): def miscKSystemTray (parent):

@ -114,7 +114,7 @@ listItems = {"Dialogs":
"KFloatValidator": [],\ "KFloatValidator": [],\
"KIntValidator": [],\ "KIntValidator": [],\
"KPixmapIO": [],\ "KPixmapIO": [],\
"KSharedPixmap": [],\ "TDESharedPixmap": [],\
"KSystemTray": [],\ "KSystemTray": [],\
"KThemeBase": ["KThemeCache", "KThemePixmap", "KThemeStyle"],\ "KThemeBase": ["KThemeCache", "KThemePixmap", "KThemeStyle"],\
"QXEmbed": []}} "QXEmbed": []}}

@ -15,128 +15,128 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $ * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
*/ */
class KShared { class TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers perfectly. So just * count is 0. This struct emulates C++ pointers perfectly. So just
* use it like a simple C++ pointer. * use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $ * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
*/ */
template< class T > template< class T >
struct KSharedPtr struct TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->KShared::_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->TDEShared::_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->KShared::_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->TDEShared::_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * the last reference, the object will be deleted.
*/ */
~KSharedPtr() { if ( ptr ) ptr->KShared::_KShared_unref(); } ~TDESharedPtr() { if ( ptr ) ptr->TDEShared::_TDEShared_unref(); }
KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) { TDESharedPtr<T>& operator= ( const TDESharedPtr<T>& p ) {
if ( ptr == p.ptr ) return *this; if ( ptr == p.ptr ) return *this;
if ( ptr ) ptr->KShared::_KShared_unref(); if ( ptr ) ptr->TDEShared::_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->KShared::_KShared_ref(); if ( ptr ) ptr->TDEShared::_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->KShared::_KShared_unref(); if ( ptr ) ptr->TDEShared::_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->KShared::_KShared_ref(); if ( ptr ) ptr->TDEShared::_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -163,7 +163,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return the number of references * @return the number of references
*/ */
int count() const { return ptr->KShared::_KShared_count(); } // for debugging purposes int count() const { return ptr->TDEShared::_TDEShared_count(); } // for debugging purposes
private: private:
T* ptr; T* ptr;
}; };

@ -15,128 +15,128 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $ * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
*/ */
class KShared { class TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers perfectly. So just * count is 0. This struct emulates C++ pointers perfectly. So just
* use it like a simple C++ pointer. * use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $ * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
*/ */
template< class T > template< class T >
struct KSharedPtr struct TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -163,7 +163,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,128 +15,128 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $ * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
*/ */
class KShared { class TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers perfectly. So just * count is 0. This struct emulates C++ pointers perfectly. So just
* use it like a simple C++ pointer. * use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $ * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
*/ */
template< class T > template< class T >
struct KSharedPtr struct TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -163,7 +163,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,128 +15,128 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $ * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
*/ */
class KShared { class TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers perfectly. So just * count is 0. This struct emulates C++ pointers perfectly. So just
* use it like a simple C++ pointer. * use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $ * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
*/ */
template< class T > template< class T >
struct KSharedPtr struct TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -163,7 +163,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $ * @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $
*/ */
class KShared { class TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly. * count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer. * So just use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* WARNING: Please note that this class template provides an implicit * WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't * 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> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $ * @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $
*/ */
template< class T > template< class T >
struct KSharedPtr struct TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -167,7 +167,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $ * @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $
*/ */
class KShared { class TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly. * count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer. * So just use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* WARNING: Please note that this class template provides an implicit * WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't * 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> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $ * @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $
*/ */
template< class T > template< class T >
struct KSharedPtr struct TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -167,7 +167,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $ * @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $
*/ */
class KShared { class TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly. * count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer. * So just use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* WARNING: Please note that this class template provides an implicit * WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't * 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> * @author Waldo Bastian <bastian@kde.org>
* @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $ * @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $
*/ */
template< class T > template< class T >
struct KSharedPtr struct TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -167,7 +167,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
#include "tdelibs_export.h" #include "tdelibs_export.h"
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
*/ */
class TDECORE_EXPORT KShared { class TDECORE_EXPORT TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly. * count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer. * So just use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* WARNING: Please note that this class template provides an implicit * WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't * 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> * @author Waldo Bastian <bastian@kde.org>
*/ */
template< class T > template< class T >
class KSharedPtr class TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -167,7 +167,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
#include "tdelibs_export.h" #include "tdelibs_export.h"
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
*/ */
class TDECORE_EXPORT KShared { class TDECORE_EXPORT TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly. * count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer. * So just use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* WARNING: Please note that this class template provides an implicit * WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't * 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> * @author Waldo Bastian <bastian@kde.org>
*/ */
template< class T > template< class T >
class KSharedPtr class TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -167,7 +167,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
#include "tdelibs_export.h" #include "tdelibs_export.h"
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
*/ */
class TDECORE_EXPORT KShared { class TDECORE_EXPORT TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly. * count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer. * So just use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* WARNING: Please note that this class template provides an implicit * WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't * 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> * @author Waldo Bastian <bastian@kde.org>
*/ */
template< class T > template< class T >
class KSharedPtr class TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -167,7 +167,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
#include "tdelibs_export.h" #include "tdelibs_export.h"
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
*/ */
class TDECORE_EXPORT KShared { class TDECORE_EXPORT TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly. * count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer. * So just use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* WARNING: Please note that this class template provides an implicit * WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't * 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> * @author Waldo Bastian <bastian@kde.org>
*/ */
template< class T > template< class T >
class KSharedPtr class TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -167,7 +167,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
#include "tdelibs_export.h" #include "tdelibs_export.h"
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
*/ */
class TDECORE_EXPORT KShared { class TDECORE_EXPORT TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly. * count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer. * So just use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* WARNING: Please note that this class template provides an implicit * WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't * 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> * @author Waldo Bastian <bastian@kde.org>
*/ */
template< class T > template< class T >
class KSharedPtr class TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -167,7 +167,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
#include "tdelibs_export.h" #include "tdelibs_export.h"
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
*/ */
class TDECORE_EXPORT KShared { class TDECORE_EXPORT TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly. * count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer. * So just use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* WARNING: Please note that this class template provides an implicit * WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't * 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> * @author Waldo Bastian <bastian@kde.org>
*/ */
template< class T > template< class T >
class KSharedPtr class TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -167,7 +167,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
#include "tdelibs_export.h" #include "tdelibs_export.h"
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
*/ */
class TDECORE_EXPORT KShared { class TDECORE_EXPORT TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly. * count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer. * So just use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* WARNING: Please note that this class template provides an implicit * WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't * 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> * @author Waldo Bastian <bastian@kde.org>
*/ */
template< class T > template< class T >
class KSharedPtr class TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -167,7 +167,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KSharedPTR_H #ifndef TDESharedPTR_H
#define KSharedPTR_H #define TDESharedPTR_H
#include "tdelibs_export.h" #include "tdelibs_export.h"
/** /**
* Reference counting for shared objects. If you derive your object * Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with * 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 * 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 * not be deleted until all references to the object have been
* released. * released.
* *
* You should probably not ever use any of the methods in this class * You should probably not ever use any of the methods in this class
* directly -- let the KSharedPtr take care of that. Just derive * directly -- let the TDESharedPtr take care of that. Just derive
* your class from KShared and forget about it. * your class from TDEShared and forget about it.
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
*/ */
class TDECORE_EXPORT KShared { class TDECORE_EXPORT TDEShared {
public: public:
/** /**
* Standard constructor. This will initialize the reference count * Standard constructor. This will initialize the reference count
* on this object to 0. * on this object to 0.
*/ */
KShared() : count(0) { } TDEShared() : count(0) { }
/** /**
* Copy constructor. This will @em not actually copy the objects * Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0. * 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. * Overloaded assignment operator.
*/ */
KShared &operator=(const KShared & ) { return *this; } TDEShared &operator=(const TDEShared & ) { return *this; }
/** /**
* Increases the reference count by one. * 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 * Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself. * 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 the current number of references held.
* *
* @return Number of references * @return Number of references
*/ */
int _KShared_count() const { return count; } int _TDEShared_count() const { return count; }
protected: protected:
virtual ~KShared() { } virtual ~TDEShared() { }
private: private:
mutable int count; mutable int count;
}; };
/** /**
* Can be used to control the lifetime of an object that has derived * 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 * object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly. * count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer. * So just use it like a simple C++ pointer.
* *
* KShared and KSharedPtr are preferred over TQShared / TQSharedPtr * TDEShared and TDESharedPtr are preferred over TQShared / TQSharedPtr
* since they are more safe. * since they are more safe.
* *
* WARNING: Please note that this class template provides an implicit * WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't * 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> * @author Waldo Bastian <bastian@kde.org>
*/ */
template< class T > template< class T >
class KSharedPtr class TDESharedPtr
{ {
public: public:
/** /**
* Creates a null pointer. * Creates a null pointer.
*/ */
KSharedPtr() TDESharedPtr()
: ptr(0) { } : ptr(0) { }
/** /**
* Creates a new pointer. * Creates a new pointer.
* @param t the pointer * @param t the pointer
*/ */
KSharedPtr( T* t ) TDESharedPtr( T* t )
: ptr(t) { if ( ptr ) ptr->_KShared_ref(); } : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Copies a pointer. * Copies a pointer.
* @param p the pointer to copy * @param p the pointer to copy
*/ */
KSharedPtr( const KSharedPtr& p ) TDESharedPtr( const TDESharedPtr& p )
: ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); } : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/** /**
* Unreferences the object that this pointer points to. If it was * Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted. * 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 == p.ptr ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr; ptr = p.ptr;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
KSharedPtr<T>& operator= ( T* p ) { TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this; if ( ptr == p ) return *this;
if ( ptr ) ptr->_KShared_unref(); if ( ptr ) ptr->_TDEShared_unref();
ptr = p; ptr = p;
if ( ptr ) ptr->_KShared_ref(); if ( ptr ) ptr->_TDEShared_ref();
return *this; return *this;
} }
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 KSharedPtr<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 T* p ) const { return ( ptr != p ); } bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); } bool operator!() const { return ( ptr == 0 ); }
@ -167,7 +167,7 @@ public:
* Returns the number of references. * Returns the number of references.
* @return 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: private:
T* ptr; T* ptr;
}; };

@ -184,7 +184,7 @@ def qtNoTr (filelist):
def shpix (): def shpix ():
# if concatenated, the sip*.cpp file doesn't exist # if concatenated, the sip*.cpp file doesn't exist
fn = ['siptdeuiKSharedPixmap.cpp'] fn = ['siptdeuiTDESharedPixmap.cpp']
if not os.path.exists (os.path.join (opPath, fn [0])): if not os.path.exists (os.path.join (opPath, fn [0])):
files = os.listdir (opPath) files = os.listdir (opPath)
fn = [] fn = []
@ -206,9 +206,9 @@ def shpix ():
state = None state = None
for ln in range (0, len (buff)): for ln in range (0, len (buff)):
line = buff [ln] line = buff [ln]
if string.find (line, "sipKSharedPixmap::resolution") >= 0: if string.find (line, "sipTDESharedPixmap::resolution") >= 0:
state = "res" state = "res"
elif string.find (line, "sipKSharedPixmap::setResolution") >= 0: elif string.find (line, "sipTDESharedPixmap::setResolution") >= 0:
state = "setRes" state = "setRes"
else: else:
state = None state = None

@ -33,7 +33,7 @@ class KMimeType : KServiceType
public: public:
typedef KSharedPtr<KMimeType> Ptr; typedef TDESharedPtr<KMimeType> Ptr;
typedef TQValueList<KMimeType::Ptr> List; typedef TQValueList<KMimeType::Ptr> List;
public: public:
@ -252,7 +252,7 @@ protected:
if (!sipCpp) if (!sipCpp)
return NULL; return NULL;
KSharedPtr<KMimeType> *cPtr = (KSharedPtr<KMimeType> *)sipCpp; TDESharedPtr<KMimeType> *cPtr = (TDESharedPtr<KMimeType> *)sipCpp;
KMimeType *cpp = new KMimeType (*cPtr->data ()); KMimeType *cpp = new KMimeType (*cPtr->data ());
PyObject *obj = sipConvertFromInstance (cpp, sipClass_KMimeType, sipTransferObj); PyObject *obj = sipConvertFromInstance (cpp, sipClass_KMimeType, sipTransferObj);
@ -274,7 +274,7 @@ protected:
return 0; return 0;
} }
*sipCppPtr = new KSharedPtr<KMimeType> (cpp); *sipCppPtr = new TDESharedPtr<KMimeType> (cpp);
return 1; return 1;
%End %End

@ -32,7 +32,7 @@ class KProtocolInfo : KSycocaEntry
public: public:
typedef KSharedPtr<KProtocolInfo> Ptr; typedef TDESharedPtr<KProtocolInfo> Ptr;
public: public:
KProtocolInfo (const TQString&); KProtocolInfo (const TQString&);
@ -187,7 +187,7 @@ protected:
if (!sipCpp) if (!sipCpp)
return NULL; return NULL;
KSharedPtr<KProtocolInfo> *cPtr = new KSharedPtr<KProtocolInfo>(*(KSharedPtr<KProtocolInfo> *)sipCpp); TDESharedPtr<KProtocolInfo> *cPtr = new TDESharedPtr<KProtocolInfo>(*(TDESharedPtr<KProtocolInfo> *)sipCpp);
KProtocolInfo *cpp = cPtr->data (); KProtocolInfo *cpp = cPtr->data ();
PyObject *obj = sipConvertFromInstance (cpp, sipClass_KProtocolInfo, sipTransferObj); PyObject *obj = sipConvertFromInstance (cpp, sipClass_KProtocolInfo, sipTransferObj);
@ -209,7 +209,7 @@ protected:
return 0; return 0;
} }
*sipCppPtr = new KSharedPtr<KProtocolInfo> (cpp); *sipCppPtr = new TDESharedPtr<KProtocolInfo> (cpp);
return 1; return 1;
%End %End

@ -32,7 +32,7 @@ class KService : KSycocaEntry
public: public:
//ig typedef KSharedPtr<KService> Ptr; //ig typedef TDESharedPtr<KService> Ptr;
//ig typedef TQValueList<KService::Ptr> List; //ig typedef TQValueList<KService::Ptr> List;
public: public:
@ -164,7 +164,7 @@ protected:
%TypeHeaderCode %TypeHeaderCode
#include <ksharedptr.h> #include <ksharedptr.h>
#include <kservice.h> #include <kservice.h>
//typedef KSharedPtr<KService> SvcPtr; //typedef TDESharedPtr<KService> SvcPtr;
//typedef KService::Ptr SvcPtr; //typedef KService::Ptr SvcPtr;
%End %End
@ -174,7 +174,7 @@ protected:
if (!sipCpp) if (!sipCpp)
return NULL; return NULL;
KSharedPtr<KService> *cPtr = new KSharedPtr<KService> (*(KSharedPtr<KService> *)sipCpp); TDESharedPtr<KService> *cPtr = new TDESharedPtr<KService> (*(TDESharedPtr<KService> *)sipCpp);
KService *cpp = cPtr->data (); KService *cpp = cPtr->data ();
PyObject *obj = sipConvertFromInstance (cpp, sipClass_KService, sipTransferObj); PyObject *obj = sipConvertFromInstance (cpp, sipClass_KService, sipTransferObj);
@ -196,7 +196,7 @@ protected:
return 0; return 0;
} }
*sipCppPtr = new KSharedPtr<KService> (cpp); *sipCppPtr = new TDESharedPtr<KService> (cpp);
return 1; return 1;
%End %End
@ -209,7 +209,7 @@ protected:
%TypeHeaderCode %TypeHeaderCode
#include <tqvaluelist.h> #include <tqvaluelist.h>
#include <kservice.h> #include <kservice.h>
//typedef KSharedPtr<KService> Ptr; //typedef TDESharedPtr<KService> Ptr;
//typedef TQValueList<Ptr> SvcList; //typedef TQValueList<Ptr> SvcList;
//typedef KService::List SvcList; //typedef KService::List SvcList;
typedef TQValueList<KService::Ptr> List; typedef TQValueList<KService::Ptr> List;
@ -230,12 +230,12 @@ typedef TQValueList<KService::Ptr> List;
// Get it. // Get it.
KService::List *cList = (KService::List *)sipCpp; KService::List *cList = (KService::List *)sipCpp;
PyObject *inst; PyObject *inst;
KSharedPtr<KService> *svc; TDESharedPtr<KService> *svc;
KService::List::Iterator it; KService::List::Iterator it;
for( it = cList->begin(); it != cList->end(); ++it ) for( it = cList->begin(); it != cList->end(); ++it )
{ {
KSharedPtr <KService> svcptr = static_cast<KService::Ptr>(*it); TDESharedPtr <KService> svcptr = static_cast<KService::Ptr>(*it);
svc = &svcptr; svc = &svcptr;
inst = sipConvertFromType(svc, sipType_KService_Ptr, sipTransferObj); inst = sipConvertFromType(svc, sipType_KService_Ptr, sipTransferObj);

@ -32,8 +32,8 @@ class KServiceGroup : KSycocaEntry
public: public:
//ig typedef KSharedPtr<KServiceGroup> Ptr; //ig typedef TDESharedPtr<KServiceGroup> Ptr;
//ig typedef KSharedPtr<KSycocaEntry> SPtr; //ig typedef TDESharedPtr<KSycocaEntry> SPtr;
%If ( KDE_3_1_2 - ) %If ( KDE_3_1_2 - )
//ig typedef TQValueList<KServiceGroup::SPtr> List; //ig typedef TQValueList<KServiceGroup::SPtr> List;
@ -144,7 +144,7 @@ class KServiceSeparator : KSycocaEntry
public: public:
//ig typedef KSharedPtr<KServiceSeparator> Ptr; //ig typedef TDESharedPtr<KServiceSeparator> Ptr;
public: public:
KServiceSeparator (); KServiceSeparator ();
@ -173,7 +173,7 @@ public:
if (!sipCpp) if (!sipCpp)
return NULL; return NULL;
KSharedPtr<KServiceGroup> *cPtr = new KSharedPtr<KServiceGroup> (*(KSharedPtr<KServiceGroup> *)sipCpp); TDESharedPtr<KServiceGroup> *cPtr = new TDESharedPtr<KServiceGroup> (*(TDESharedPtr<KServiceGroup> *)sipCpp);
KServiceGroup *cpp = cPtr->data (); KServiceGroup *cpp = cPtr->data ();
PyObject *obj = sipConvertFromInstance (cpp, sipClass_KServiceGroup, sipTransferObj); PyObject *obj = sipConvertFromInstance (cpp, sipClass_KServiceGroup, sipTransferObj);
@ -195,7 +195,7 @@ public:
return 0; return 0;
} }
*sipCppPtr = new KSharedPtr<KServiceGroup> (cpp); *sipCppPtr = new TDESharedPtr<KServiceGroup> (cpp);
return 1; return 1;
%End %End
@ -230,12 +230,12 @@ public:
KServiceGroup::List *cList = (KServiceGroup::List *)sipCpp; KServiceGroup::List *cList = (KServiceGroup::List *)sipCpp;
PyObject *inst; PyObject *inst;
KSharedPtr <KSycocaEntry> *svcGroupType; TDESharedPtr <KSycocaEntry> *svcGroupType;
KServiceGroup::List::Iterator it; KServiceGroup::List::Iterator it;
for( it = cList->begin(); it != cList->end(); ++it ) for( it = cList->begin(); it != cList->end(); ++it )
{ {
KSharedPtr<KSycocaEntry> svcptr = static_cast<KServiceGroup::SPtr>(*it); TDESharedPtr<KSycocaEntry> svcptr = static_cast<KServiceGroup::SPtr>(*it);
svcGroupType = &svcptr; svcGroupType = &svcptr;
inst = sipConvertFromType(svcGroupType, sipType_KSycocaEntry_Ptr, sipTransferObj); inst = sipConvertFromType(svcGroupType, sipType_KSycocaEntry_Ptr, sipTransferObj);

@ -235,12 +235,12 @@ protected:
// Get it. // Get it.
TQValueList<KServiceType::Ptr> *cList = (TQValueList<KServiceType::Ptr> *)sipCpp; TQValueList<KServiceType::Ptr> *cList = (TQValueList<KServiceType::Ptr> *)sipCpp;
PyObject *inst; PyObject *inst;
KSharedPtr <KServiceType> *svc; TDESharedPtr <KServiceType> *svc;
TQValueList<KServiceType::Ptr>::Iterator it; TQValueList<KServiceType::Ptr>::Iterator it;
for( it = cList->begin(); it != cList->end(); ++it ) for( it = cList->begin(); it != cList->end(); ++it )
{ {
KSharedPtr <KServiceType> svcptr = static_cast<KServiceType::Ptr>(*it); TDESharedPtr <KServiceType> svcptr = static_cast<KServiceType::Ptr>(*it);
svc = &svcptr; svc = &svcptr;
inst = sipConvertFromType(svc, sipType_KServiceType_Ptr, sipTransferObj); inst = sipConvertFromType(svc, sipType_KServiceType_Ptr, sipTransferObj);

@ -24,7 +24,7 @@
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class KSycocaEntry : KShared class KSycocaEntry : TDEShared
{ {
%TypeHeaderCode %TypeHeaderCode
#include <tdesycocaentry.h> #include <tdesycocaentry.h>
@ -36,7 +36,7 @@ public:
virtual KSycocaType sycocaType () const; virtual KSycocaType sycocaType () const;
public: public:
//ig typedef KSharedPtr<KSycocaEntry> Ptr; //ig typedef TDESharedPtr<KSycocaEntry> Ptr;
//ig typedef TQValueList<KSycocaEntry::Ptr> List; //ig typedef TQValueList<KSycocaEntry::Ptr> List;
public: public:
@ -79,7 +79,7 @@ protected:
if (!sipCpp) if (!sipCpp)
return NULL; return NULL;
KSharedPtr<KSycocaEntry> *cPtr = new KSharedPtr<KSycocaEntry> (*(KSharedPtr<KSycocaEntry> *)sipCpp); TDESharedPtr<KSycocaEntry> *cPtr = new TDESharedPtr<KSycocaEntry> (*(TDESharedPtr<KSycocaEntry> *)sipCpp);
KSycocaEntry *cpp = cPtr->data (); KSycocaEntry *cpp = cPtr->data ();
PyObject *obj = sipConvertFromInstance (cpp, sipClass_KSycocaEntry, sipTransferObj); PyObject *obj = sipConvertFromInstance (cpp, sipClass_KSycocaEntry, sipTransferObj);
@ -101,7 +101,7 @@ protected:
return 0; return 0;
} }
*sipCppPtr = new KSharedPtr<KSycocaEntry> (cpp); *sipCppPtr = new TDESharedPtr<KSycocaEntry> (cpp);
return 1; return 1;
%End %End
@ -137,23 +137,23 @@ protected:
KSycocaEntry::List *cList = (KSycocaEntry::List *)sipCpp; KSycocaEntry::List *cList = (KSycocaEntry::List *)sipCpp;
PyObject *inst; PyObject *inst;
KSharedPtr<KSycocaEntry> *svc; TDESharedPtr<KSycocaEntry> *svc;
KSharedPtr <KService> *svcType; TDESharedPtr <KService> *svcType;
KSharedPtr <KServiceGroup> *svcGroupType; TDESharedPtr <KServiceGroup> *svcGroupType;
KSycocaEntry::List::Iterator it; KSycocaEntry::List::Iterator it;
for( it = cList->begin(); it != cList->end(); ++it ) for( it = cList->begin(); it != cList->end(); ++it )
{ {
KSharedPtr<KSycocaEntry> svcptr = static_cast<KSycocaEntry::Ptr>(*it); TDESharedPtr<KSycocaEntry> svcptr = static_cast<KSycocaEntry::Ptr>(*it);
svc = &svcptr; svc = &svcptr;
if (svc->data ()->sycocaType () == KST_KService) if (svc->data ()->sycocaType () == KST_KService)
{ {
svcType = (KSharedPtr<KService> *)svc; svcType = (TDESharedPtr<KService> *)svc;
inst = sipConvertFromType(svcType, sipType_KService_Ptr, sipTransferObj); inst = sipConvertFromType(svcType, sipType_KService_Ptr, sipTransferObj);
} }
else if (svc->data ()->sycocaType () == KST_KServiceGroup) else if (svc->data ()->sycocaType () == KST_KServiceGroup)
{ {
svcGroupType = (KSharedPtr <KServiceGroup> *) svc; svcGroupType = (TDESharedPtr <KServiceGroup> *) svc;
inst = sipConvertFromType(svcGroupType, sipType_KServiceGroup_Ptr, sipTransferObj); inst = sipConvertFromType(svcGroupType, sipType_KServiceGroup_Ptr, sipTransferObj);
} }
else else

@ -37,7 +37,7 @@ public:
static TDEConfig* config (); static TDEConfig* config ();
%If ( KDE_3_2_0 - ) %If ( KDE_3_2_0 - )
static KSharedConfig* sharedConfig (); static TDESharedConfig* sharedConfig ();
%End %End
static KIconLoader* iconLoader (); static KIconLoader* iconLoader ();

@ -39,7 +39,7 @@ public:
TDEConfig* config () const; TDEConfig* config () const;
%If ( KDE_3_2_0 - ) %If ( KDE_3_2_0 - )
KSharedConfig* sharedConfig () const; TDESharedConfig* sharedConfig () const;
%End %End
KIconLoader* iconLoader () const; KIconLoader* iconLoader () const;

@ -26,7 +26,7 @@
%If ( KDE_3_3_0 - ) %If ( KDE_3_3_0 - )
class KLockFile : KShared class KLockFile : TDEShared
{ {
%TypeHeaderCode %TypeHeaderCode
#include <klockfile.h> #include <klockfile.h>
@ -34,7 +34,7 @@ class KLockFile : KShared
public: public:
typedef KSharedPtr<KLockFile> Ptr; typedef TDESharedPtr<KLockFile> Ptr;
KLockFile (const TQString&); KLockFile (const TQString&);
enum LockResult enum LockResult
@ -80,7 +80,7 @@ public:
if (!sipCpp) if (!sipCpp)
return NULL; return NULL;
KSharedPtr<KLockFile> *cPtr = new KSharedPtr<KLockFile> (*(KSharedPtr<KLockFile> *)sipCpp); TDESharedPtr<KLockFile> *cPtr = new TDESharedPtr<KLockFile> (*(TDESharedPtr<KLockFile> *)sipCpp);
KLockFile *cpp = cPtr->data (); KLockFile *cpp = cPtr->data ();
PyObject *obj = sipConvertFromInstance (cpp, sipClass_KLockFile, sipTransferObj); PyObject *obj = sipConvertFromInstance (cpp, sipClass_KLockFile, sipTransferObj);
@ -102,7 +102,7 @@ public:
return 0; return 0;
} }
*sipCppPtr = new KSharedPtr<KLockFile> (cpp); *sipCppPtr = new TDESharedPtr<KLockFile> (cpp);
return 1; return 1;
%End %End

@ -26,7 +26,7 @@
%If ( KDE_3_2_0 - ) %If ( KDE_3_2_0 - )
class KMountPoint : KShared class KMountPoint : TDEShared
{ {
%TypeHeaderCode %TypeHeaderCode
#include <kmountpoint.h> #include <kmountpoint.h>
@ -34,7 +34,7 @@ class KMountPoint : KShared
public: public:
//ig typedef KSharedPtr<KMountPoint> Ptr; //ig typedef TDESharedPtr<KMountPoint> Ptr;
//ig typedef TQValueList<KMountPoint::Ptr> List; //ig typedef TQValueList<KMountPoint::Ptr> List;
public: public:
@ -81,7 +81,7 @@ private:
if (!sipCpp) if (!sipCpp)
return NULL; return NULL;
KSharedPtr<KMountPoint> *cPtr = new KSharedPtr<KMountPoint> (*(KSharedPtr<KMountPoint> *)sipCpp); TDESharedPtr<KMountPoint> *cPtr = new TDESharedPtr<KMountPoint> (*(TDESharedPtr<KMountPoint> *)sipCpp);
KMountPoint *cpp = cPtr->data (); KMountPoint *cpp = cPtr->data ();
PyObject *obj = sipConvertFromInstance (cpp, sipClass_KMountPoint, sipTransferObj); PyObject *obj = sipConvertFromInstance (cpp, sipClass_KMountPoint, sipTransferObj);
@ -103,7 +103,7 @@ private:
return 0; return 0;
} }
*sipCppPtr = new KSharedPtr<KMountPoint> (cpp); *sipCppPtr = new TDESharedPtr<KMountPoint> (cpp);
return 1; return 1;
%End %End

@ -24,7 +24,7 @@
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class KShared class TDEShared
{ {
%TypeHeaderCode %TypeHeaderCode
#include <ksharedptr.h> #include <ksharedptr.h>
@ -32,14 +32,14 @@ class KShared
public: public:
KShared (); TDEShared ();
KShared (const KShared&); TDEShared (const TDEShared&);
void _KShared_ref (); void _TDEShared_ref ();
void _KShared_unref (); void _TDEShared_unref ();
int _KShared_count (); int _TDEShared_count ();
protected: protected:
~KShared (); ~TDEShared ();
}; // class KShared }; // class TDEShared

@ -26,7 +26,7 @@
%If ( KDE_3_5_0 - ) %If ( KDE_3_5_0 - )
class KTimezoneSource : KShared class KTimezoneSource : TDEShared
{ {
%TypeHeaderCode %TypeHeaderCode
#include <ktimezones.h> #include <ktimezones.h>
@ -56,7 +56,7 @@ public:
static const float UNKNOWN; static const float UNKNOWN;
static bool isValidLatitude (float); static bool isValidLatitude (float);
static bool isValidLongitude (float); static bool isValidLongitude (float);
KTimezone (KSharedPtr<KTimezoneSource>, const TQString&, const TQString& = TQString (), float = KTimezone ::UNKNOWN , float = KTimezone ::UNKNOWN , const TQString& = TQString ()); KTimezone (TDESharedPtr<KTimezoneSource>, const TQString&, const TQString& = TQString (), float = KTimezone ::UNKNOWN , float = KTimezone ::UNKNOWN , const TQString& = TQString ());
TQString name () const; TQString name () const;
TQString countryCode () const; TQString countryCode () const;
float latitude () const; float latitude () const;
@ -72,7 +72,7 @@ private:
public: public:
//force //force
typedef KSharedPtr<KTimezoneSource> TZSourcePtr; typedef TDESharedPtr<KTimezoneSource> TZSourcePtr;
//end //end
}; // class KTimezone }; // class KTimezone
@ -134,8 +134,8 @@ private:
%If (KDE_3_5_0 - ) %If (KDE_3_5_0 - )
%MappedType KSharedPtr<KTimezoneSource> %MappedType TDESharedPtr<KTimezoneSource>
//converts KSharedPtr<KTimezoneSource> //converts TDESharedPtr<KTimezoneSource>
{ {
%TypeHeaderCode %TypeHeaderCode
#include <ksharedptr.h> #include <ksharedptr.h>
@ -148,7 +148,7 @@ private:
if (!sipCpp) if (!sipCpp)
return NULL; return NULL;
KSharedPtr<KTimezoneSource> *cPtr = new KSharedPtr<KTimezoneSource> (*(KSharedPtr<KTimezoneSource> *)sipCpp); TDESharedPtr<KTimezoneSource> *cPtr = new TDESharedPtr<KTimezoneSource> (*(TDESharedPtr<KTimezoneSource> *)sipCpp);
KTimezoneSource *cpp = cPtr->data (); KTimezoneSource *cpp = cPtr->data ();
PyObject *obj = sipConvertFromInstance (cpp, sipClass_KTimezoneSource, sipTransferObj); PyObject *obj = sipConvertFromInstance (cpp, sipClass_KTimezoneSource, sipTransferObj);
@ -170,7 +170,7 @@ private:
return 0; return 0;
} }
*sipCppPtr = new KSharedPtr<KTimezoneSource> (cpp); *sipCppPtr = new TDESharedPtr<KTimezoneSource> (cpp);
return 1; return 1;
%End %End

@ -79,7 +79,7 @@ protected:
%If ( KDE_3_2_0 - ) %If ( KDE_3_2_0 - )
class KSharedConfig : TDEConfig, KShared class TDESharedConfig : TDEConfig, TDEShared
{ {
%TypeHeaderCode %TypeHeaderCode
#include <tdeconfig.h> #include <tdeconfig.h>
@ -87,16 +87,16 @@ class KSharedConfig : TDEConfig, KShared
public: public:
//ig typedef KSharedPtr<KSharedConfig> Ptr; //ig typedef TDESharedPtr<TDESharedConfig> Ptr;
public: public:
static KSharedConfig::Ptr openConfig (const TQString&, bool = 0, bool = 1); static TDESharedConfig::Ptr openConfig (const TQString&, bool = 0, bool = 1);
private: private:
KSharedConfig (const TQString&, bool, bool); TDESharedConfig (const TQString&, bool, bool);
~KSharedConfig (); ~TDESharedConfig ();
}; // class KSharedConfig }; // class TDESharedConfig
%End %End
@ -192,8 +192,8 @@ private:
%If (KDE_3_2_0 - ) %If (KDE_3_2_0 - )
%MappedType KSharedConfig::Ptr %MappedType TDESharedConfig::Ptr
//converts KSharedConfig //converts TDESharedConfig
{ {
%TypeHeaderCode %TypeHeaderCode
#include <ksharedptr.h> #include <ksharedptr.h>
@ -206,9 +206,9 @@ private:
if (!sipCpp) if (!sipCpp)
return NULL; return NULL;
KSharedPtr<KSharedConfig> *cPtr = new KSharedPtr<KSharedConfig> (*(KSharedPtr<KSharedConfig> *)sipCpp); TDESharedPtr<TDESharedConfig> *cPtr = new TDESharedPtr<TDESharedConfig> (*(TDESharedPtr<TDESharedConfig> *)sipCpp);
KSharedConfig *cpp = cPtr->data (); TDESharedConfig *cpp = cPtr->data ();
PyObject *obj = sipConvertFromInstance (cpp, sipClass_KSharedConfig, sipTransferObj); PyObject *obj = sipConvertFromInstance (cpp, sipClass_TDESharedConfig, sipTransferObj);
return obj; return obj;
%End %End
@ -220,7 +220,7 @@ private:
return PyInstance_Check(sipPy); return PyInstance_Check(sipPy);
int iserr = 0; int iserr = 0;
KSharedConfig *cpp = (KSharedConfig *)sipForceConvertToType(sipPy, sipType_KSharedConfig, sipTransferObj, SIP_NO_CONVERTORS, NULL, &iserr); TDESharedConfig *cpp = (TDESharedConfig *)sipForceConvertToType(sipPy, sipType_TDESharedConfig, sipTransferObj, SIP_NO_CONVERTORS, NULL, &iserr);
if (iserr) if (iserr)
{ {
@ -228,7 +228,7 @@ private:
return 0; return 0;
} }
*sipCppPtr = new KSharedPtr<KSharedConfig> (cpp); *sipCppPtr = new TDESharedPtr<TDESharedConfig> (cpp);
return 1; return 1;
%End %End

@ -227,7 +227,7 @@ public:
public: public:
TDEConfigSkeleton (const TQString& = TQString ::null ); TDEConfigSkeleton (const TQString& = TQString ::null );
TDEConfigSkeleton (KSharedConfig::Ptr); TDEConfigSkeleton (TDESharedConfig::Ptr);
void setDefaults (); void setDefaults ();
void readConfig (); void readConfig ();
void writeConfig (); void writeConfig ();

@ -28,7 +28,7 @@
namespace KRES namespace KRES
{ {
class ResourcePageInfo : KShared class ResourcePageInfo : TDEShared
{ {
%TypeHeaderCode %TypeHeaderCode
#include <configpage.h> #include <configpage.h>

@ -28,15 +28,15 @@
namespace KSpell2 namespace KSpell2
{ {
class Broker : TQObject, KShared class Broker : TQObject, TDEShared
{ {
%TypeHeaderCode %TypeHeaderCode
#include <broker.h> #include <broker.h>
%End %End
public: public:
typedef KSharedPtr<Broker> Ptr; typedef TDESharedPtr<Broker> Ptr;
static KSpell2::Broker* openBroker (KSharedConfig* = 0); static KSpell2::Broker* openBroker (TDESharedConfig* = 0);
public: public:
KSpell2::DefaultDictionary* defaultDictionary () const; KSpell2::DefaultDictionary* defaultDictionary () const;
@ -52,7 +52,7 @@ protected:
void changed (); void changed ();
private: private:
Broker (KSharedConfig*); Broker (TDESharedConfig*);
}; // class Broker }; // class Broker

@ -50,10 +50,10 @@ public:
TQStringList currentIgnoreList () const; TQStringList currentIgnoreList () const;
bool ignore (const TQString&); bool ignore (const TQString&);
void save (); void save ();
KSharedConfig* sharedConfig () const; TDESharedConfig* sharedConfig () const;
private: private:
Settings (KSpell2::Broker*, KSharedConfig*); Settings (KSpell2::Broker*, TDESharedConfig*);
}; // class Settings }; // class Settings

@ -161,7 +161,7 @@ protected:
{sipName_KSelectAction, &sipClass_KSelectAction}, {sipName_KSelectAction, &sipClass_KSelectAction},
{sipName_KSelector, &sipClass_KSelector}, {sipName_KSelector, &sipClass_KSelector},
{sipName_KSeparator, &sipClass_KSeparator}, {sipName_KSeparator, &sipClass_KSeparator},
// {sipName_KSharedPixmap, &sipClass_KSharedPixmap}, // {sipName_TDESharedPixmap, &sipClass_TDESharedPixmap},
{sipName_KSqueezedTextLabel, &sipClass_KSqueezedTextLabel}, {sipName_KSqueezedTextLabel, &sipClass_KSqueezedTextLabel},
{sipName_KStatusBar, &sipClass_KStatusBar}, {sipName_KStatusBar, &sipClass_KStatusBar},
{sipName_KStatusBarLabel, &sipClass_KStatusBarLabel}, {sipName_KStatusBarLabel, &sipClass_KStatusBarLabel},

@ -80,7 +80,7 @@ public:
TDEConfig* config () const; TDEConfig* config () const;
%If ( KDE_3_2_0 - ) %If ( KDE_3_2_0 - )
KSharedConfig::Ptr sharedConfig () const; TDESharedConfig::Ptr sharedConfig () const;
%End %End
Type type () const; Type type () const;

@ -65,7 +65,7 @@ signals:
protected: protected:
virtual bool eventFilter (TQObject*, TQEvent*); virtual bool eventFilter (TQObject*, TQEvent*);
//ig virtual void updateBackground (KSharedPixmap*); //ig virtual void updateBackground (TDESharedPixmap*);
}; // class KRootPixmap }; // class KRootPixmap

@ -24,7 +24,7 @@
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class KSharedPixmap : TQWidget, KPixmap class TDESharedPixmap : TQWidget, KPixmap
{ {
%TypeHeaderCode %TypeHeaderCode
#include <tqwidget.h> #include <tqwidget.h>
@ -36,7 +36,7 @@ class KSharedPixmap : TQWidget, KPixmap
public: public:
KSharedPixmap (); TDESharedPixmap ();
%If ( KDE_3_1_2 - ) %If ( KDE_3_1_2 - )
bool loadFromShared (const TQString&, const TQRect& = TQRect ()); bool loadFromShared (const TQString&, const TQRect& = TQRect ());
@ -58,5 +58,5 @@ public:
%End %End
}; // class KSharedPixmap }; // class TDESharedPixmap

Loading…
Cancel
Save