Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5208 closed Bug (fixed)

Replace baseName() withi fileName() for FULL file name

Reported by: krab Owned by: jordan
Priority: Normal Milestone: 2.76
Component: Qt Client Version: 2.75
Severity: Minor Keywords: filename
Cc:

Description

because baseName() return file name to the first dot.

Torrent files like "[tracker.tld]movie.mp4.torrent" was looks like "[tracker" only.

fileName() return full file name like its in GTK client.

Index: options.cc
===================================================================
--- options.cc  (revision 13718)
+++ options.cc  (working copy)
@@ -215,7 +215,7 @@
 
     switch( myAdd.type )
     {
-        case AddData::FILENAME: text = QFileInfo(myAdd.filename).baseName(); break;
+        case AddData::FILENAME: text = QFileInfo(myAdd.filename).fileName(); break;
         case AddData::URL:      text = myAdd.url.toString(); break;
         case AddData::MAGNET:   text = myAdd.magnet; break;
         default:                break;

Change History (5)

comment:1 Changed 8 years ago by jordan

  • Milestone changed from None Set to 2.80
  • Severity changed from Normal to Minor
  • Status changed from new to assigned

comment:2 Changed 8 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

Committed in r13734.

comment:3 Changed 8 years ago by rb07

  • Resolution fixed deleted
  • Status changed from closed to reopened

Actually you should use "completeBaseName()", since the extension is not wanted.

comment:4 Changed 8 years ago by jordan

  • Resolution set to fixed
  • Status changed from reopened to closed

Nice catch! I didn't know that function existed :)

Committed in r13737.

comment:5 Changed 8 years ago by jordan

  • Milestone changed from 2.80 to 2.76
Note: See TracTickets for help on using tickets.