--Boundary-00=_n6MXElrMmqpq/Oa Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Matt Rogers wrote: > changing the visibility of a function breaks BC because it's part of the > function's signature, IIRC I already knew this. I was thinking that the function would never be referenced outside its compilation unit; but it IS referenced by any compilation unit that includes the header file, even if it is never called. Alas, you are right. I have attached a patch for removeIconExtensionInternal() that doesn't change any visibilities. Please commit if all is well. Cheers, Luke Sandell --Boundary-00=_n6MXElrMmqpq/Oa Content-Type: text/x-diff; charset="us-ascii"; name="kiconloader2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kiconloader2.diff" Index: kiconloader.cpp =================================================================== --- kiconloader.cpp (revision 537538) +++ kiconloader.cpp (working copy) @@ -435,16 +435,25 @@ if ( extensionLength > 0 ) { -#ifndef NDEBUG - kdDebug(264) << "Application " << KGlobal::instance()->instanceName() - << " loads icon " << name << " with extension." << endl; -#endif - return name.left(name.length() - extensionLength); } return name; } +QString KIconLoader::removeIconExtensionInternal(const QString &name) const +{ + QString name_noext = removeIconExtension(name); + +#ifndef NDEBUG + if (name != name_noext) + { + kdDebug(264) << "Application " << KGlobal::instance()->instanceName() + << " loads icon " << name << " with extension." << endl; + } +#endif + + return name_noext; +} KIcon KIconLoader::findMatchingIcon(const QString& name, int size) const { @@ -529,7 +538,7 @@ if (!QDir::isRelativePath(_name)) return _name; - QString name = removeIconExtension( _name ); + QString name = removeIconExtensionInternal( _name ); QString path; if (group_or_size == KIcon::User) @@ -673,7 +682,7 @@ if (!canReturnNull && name.isEmpty()) name = str_unknown; else - name = removeIconExtension(name); + name = removeIconExtensionInternal(name); } // If size == 0, use default size for the specified group. Index: kiconloader.h =================================================================== --- kiconloader.h (revision 537538) +++ kiconloader.h (working copy) @@ -401,11 +401,19 @@ /** * Checks if name ends in one of the supported icon formats (i.e. .png) * and returns the name without the extension if it does. + * FIXME: KDE4 make public & static * @since 3.1 */ QString removeIconExtension(const QString &name) const; /** + * Same as removeIconExtension except it prints a debug message + * if an extension is removed. + * FIXME: KDE4 make static + */ + QString removeIconExtensionInternal(const QString &name) const; + + /** * Loads all the different sizes for an iconset. */ QIconSet loadIconSetNonDelayed( const QString& name, KIcon::Group group, --Boundary-00=_n6MXElrMmqpq/Oa--