gnupic@linuxhacker.org

gnupic@linuxhacker.org


Subject: Re: PiKdev : a simple IDE for development of PIC-based applications
From: matt
Date: Mon, 31 Mar 2003 12:16:28 +1100


> 
> Arghh !!.
> 
> It does now.
> 
> Thanks for your interest and sorry for this mistake.
> 
> Alain.
> 

Ok, I finally got the code.

I'm running KDE 3.1.0 and QT 3.1.1 -- it didn't compile first go.. but I 
hacked at it a little.

See below
basically it returned an error on operator ?:()... 
it said the candidates are ?:(const QString, const QString) or ?:(const char*, 
const char*)... ie. you can't use ?:(const char*, const QString)..

void PrgWid::setFileName(const QString &fname)
{
	QString temp = "<none>";

        fileName = fname ; 
//        QString fn( (fname == "") ? "<none>" : fname)   ;
// matt's patch :)
        QString fn( (fname == "") ? temp : fname)   ;

	fileNameLabel->setText(fn) ;
}

my hack is waste of space, but it works.. I don't know any elegant way without 
ditching the ?: which is always a nice way to do things.

Hope that helps.

matt

gnupic@linuxhacker.org