On Thursday 14 April 2005 22:43, Kevin Krammer wrote: > Potential patch:
> void UserSendFileEvent::setFile(const QString& file, const QString&
> description)
> {
> - edtItem->setText(file);
> - setText(description);
> + QFileInfo fileinfo(file);
> + if (fileinfo.exists() && fileinfo.isReadable())
> + {
> + edtItem->setText(file);
> + setText(description);
> + }
Sorry for that, forgot the "add to file list part" :(
Attached is the complete thing
Cheers,
Kevin
Index: usereventdlg.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/usereventdlg.cpp,v
retrieving revision 1.179
diff -u -3 -p -r1.179 usereventdlg.cpp
--- usereventdlg.cpp 5 Apr 2005 14:06:54 -0000 1.179
+++ usereventdlg.cpp 14 Apr 2005 21:00:30 -0000
@@ -30,6 +30,7 @@
#include <qaccel.h>
#include <qcheckbox.h>
#include <qdatetime.h>
+#include <qfileinfo.h>
#include <qvbox.h>
#include <qvgroupbox.h>
#include <qhgroupbox.h>
@@ -2894,8 +2895,13 @@ void UserSendFileEvent::sendButton()
void UserSendFileEvent::setFile(const QString& file, const QString& description)
{
- edtItem->setText(file);
- setText(description);
+ QFileInfo fileinfo(file);
+ if (fileinfo.exists() && fileinfo.isReadable())
+ {
+ edtItem->setText(file);
+ setText(description);
+ m_lFileList.push_back(strdup(file.latin1()));
+ }
}
void UserSendFileEvent::resetSettings()
pgpkFIEsDNCNB.pgp
Description: PGP signature
