KURLfied CvsPart
Mario Scalas
mario at gicomsrl.it
Tue Apr 29 16:49:04 UTC 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
yesterday there was a talk about KURLfy the components referring to
filesystem, avoiding the use of QFileInfo & C.
I proved myself doing this with cvs part and in a brief time modifications
where done. I tried it on my home pc using a local repository and
works-for-me.
I found the following advantages:
- - less code: no more QFileInfo fi(fileName); if fi.isDir() ...: using
KURL::fileName() && directory() where sufficient
- - less errors because of less code :)
but the following disadvantages too:
- - QString FileContext::m_fileName should be modified in KURL
FileContext::m_fileName requiring changes in all parts which use it. In my
experimentations I just put:
...
const FileContext *fcontext = static_cast<const FileContext*>(context);
popupfile.setPath( fcontext->fileName() );
...
KPopupMenu *sub = new KPopupMenu(popup);
QString name = popupfile.fileName();
...
which is why I ask is doable at this moment. Anyway I'd like to have somebody
else testing it (one can never be sure), so volunteers are accepted.
Regards,
mario.
Ps: I also changed the signature of CvsWidge::startCommand() from:
startCommand(QString &dir, QString &command);
in
startCommand(const QString &dir, const QString &command);
since seems more correct to me (hope so, at least ;)
- --
Mario Scalas <mario dot scalas at libero dot it>
Miser miser! Modo niger et ustus fortiter.
homepage: http://digilander.iol.it/zakuteam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+r/5gkfH25fNf4bcRAmvuAJ9yjJw2ZsIcH5u1yUwk1zAhWbEkvQCffUsX
H3aqmbG2EJ32rtI2fJJjNBM=
=1OeM
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cvspart-kurlfied.diff
Type: text/x-diff
Size: 7890 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20030429/367bfdfe/attachment.bin>
More information about the KDevelop-devel
mailing list