Changeset 14497
- Timestamp:
- Apr 15, 2015, 12:08:24 AM (6 years ago)
- Location:
- trunk/qt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt/freespace-label.cc
r14466 r14497 7 7 * $Id$ 8 8 */ 9 10 #include <QDir> 9 11 10 12 #include <libtransmission/transmission.h> … … 99 101 tr_variantDictFindStr (arguments, TR_KEY_path, &path, &len); 100 102 str = QString::fromUtf8 (path, len); 101 setToolTip ( str);103 setToolTip (QDir::toNativeSeparators (str)); 102 104 103 105 myTimer.start (); -
trunk/qt/path-button.cc
r14462 r14497 9 9 10 10 #include <QApplication> 11 #include <QDir> 11 12 #include <QFileDialog> 12 13 #include <QFileIconProvider> … … 64 65 return; 65 66 66 myPath = Utils::removeTrailingDirSeparator (path);67 myPath = QDir::toNativeSeparators (Utils::removeTrailingDirSeparator (path)); 67 68 68 69 updateAppearance (); … … 115 116 if (!myNameFilter.isEmpty ()) 116 117 dialog->setNameFilter (myNameFilter); 117 dialog->selectFile (myPath); 118 119 const QFileInfo pathInfo (myPath); 120 if (!myPath.isEmpty () && pathInfo.exists ()) 121 { 122 if (pathInfo.isDir ()) 123 { 124 dialog->setDirectory (pathInfo.absoluteFilePath ()); 125 } 126 else 127 { 128 dialog->setDirectory (pathInfo.absolutePath ()); 129 dialog->selectFile (pathInfo.fileName ()); 130 } 131 } 118 132 119 133 connect (dialog, SIGNAL (fileSelected (QString)), this, SLOT (onFileSelected (QString)));
Note: See TracChangeset
for help on using the changeset viewer.