
Originally Posted by
wysota
QUrlOperator::copy()
I have not been able to get this to work. Here is my code:
QUrlOperator urlOp;
....
qDebug(TargetSelector->getFilename());
qDebug
(dirs.
ref_dir + (QString) "/");
// copy the reference file to ~/.lprof/target_refs
urlOp.
copy( TargetSelector
->getFilename
(), dirs.
ref_dir + (QString) "/");
QUrlOperator urlOp;
....
qDebug(TargetSelector->getFilename());
qDebug(dirs.ref_dir + (QString) "/");
// copy the reference file to ~/.lprof/target_refs
urlOp.copy( TargetSelector->getFilename(), dirs.ref_dir + (QString) "/");
To copy to clipboard, switch view to plain text mode
The two qDebug lines are to confirm that the from file name and the to directory name are both correct (they are). I tried with and without the trailing "/" on the to directory. What do I need to do to make this work?
Bookmarks