Use preprocessor stringify for libksquirrel definitions

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 9 years ago
parent 9a4419b617
commit 8f8831f315

@ -10,6 +10,11 @@
** destructor.
*****************************************************************************/
#if !defined(QT_STRINGIFY)
# define QT_STRINGIFY2(x) #x
# define QT_STRINGIFY(x) QT_STRINGIFY2(x)
#endif
void KLC::init()
{
changed = false;
@ -25,7 +30,7 @@ void KLC::init()
connect(lister, TQT_SIGNAL(deleteItem(KFileItem *)), this, TQT_SLOT(slotDeleteItem(KFileItem *)));
connect(lister, TQT_SIGNAL(newItems(const KFileItemList &)), this, TQT_SLOT(slotNewItems(const KFileItemList &)));
base = KURL::fromPathOrURL(SQ_KLIBS);
base = KURL::fromPathOrURL(QT_STRINGIFY(SQ_KLIBS));
backup = base;
backup.addPath("backup");
@ -99,7 +104,7 @@ void KLC::slotNewItems(const KFileItemList &list)
{
KFileItemListIterator it(list);
KFileItem *fi;
TQString soname = TQString::fromLatin1(".so.%1").arg(SQ_KL_VER);
TQString soname = TQString::fromLatin1(".so.%1").arg(QT_STRINGIFY(SQ_KL_VER));
while((fi = it.current()))
{

@ -41,6 +41,11 @@
#include <iostream>
#include <iomanip>
#if !defined(QT_STRINGIFY)
# define QT_STRINGIFY2(x) #x
# define QT_STRINGIFY(x) QT_STRINGIFY2(x)
#endif
static const int buffer_size = 10;
SQ_LibraryHandler * SQ_LibraryHandler::m_instance = 0;
@ -513,7 +518,7 @@ void SQ_LibraryHandler::load()
{
TQStringList libs;
TQDir dir(SQ_KLIBS, TQString(), TQDir::Unsorted, TQDir::Files);
TQDir dir(QT_STRINGIFY(SQ_KLIBS), TQString(), TQDir::Unsorted, TQDir::Files);
const TQFileInfoList *list = dir.entryInfoList();

@ -41,6 +41,11 @@
#include <iostream>
#include <iomanip>
#if !defined(QT_STRINGIFY)
# define QT_STRINGIFY2(x) #x
# define QT_STRINGIFY(x) QT_STRINGIFY2(x)
#endif
static const int buffer_size = 10;
SQ_LibraryHandler * SQ_LibraryHandler::m_instance = 0;
@ -513,7 +518,7 @@ void SQ_LibraryHandler::load()
{
TQStringList libs;
TQDir dir(SQ_KLIBS, TQString(), TQDir::Unsorted, TQDir::Files);
TQDir dir(QT_STRINGIFY(SQ_KLIBS), TQString(), TQDir::Unsorted, TQDir::Files);
const TQFileInfoList *list = dir.entryInfoList();

@ -7,6 +7,11 @@
** place of a destructor.
*****************************************************************************/
#if !defined(QT_STRINGIFY)
# define QT_STRINGIFY2(x) #x
# define QT_STRINGIFY(x) QT_STRINGIFY2(x)
#endif
/*
* SQ_PluginsInfo shows all found by SQ_LibraryListener libraries.
*/
@ -23,7 +28,7 @@ void SQ_PluginsInfo::showLibs()
{
int cnt = SQ_LibraryHandler::instance()->count();
textLibs->setText(SQ_KLIBS);
textLibs->setText(QT_STRINGIFY(SQ_KLIBS));
textCount->setNum(cnt);
if(!cnt) return;

Loading…
Cancel
Save