Changeset 13923 for branches


Ignore:
Timestamp:
Feb 1, 2013, 7:03:26 PM (9 years ago)
Author:
jordan
Message:

(2.7x) backport r13859 to fix bug #5248 in the 2.7x branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.7x/qt/make-dialog.cc

    r13555 r13923  
    114114    // get the tiers
    115115    int tier = 0;
    116     QList<tr_tracker_info> trackers;
    117     foreach( QString line, myTrackerEdit->toPlainText().split(QChar::fromAscii('\n')) ) {
     116    QVector<tr_tracker_info> trackers;
     117    foreach( QString line, myTrackerEdit->toPlainText().split("\n") ) {
    118118        line = line.trimmed( );
    119119        if( line.isEmpty( ) )
     
    148148
    149149    // the file to create
    150     const QString path = QString::fromLocal8Bit( myBuilder->top );
    151     const QString torrentName = QFileInfo(path).completeBaseName() + QString::fromAscii(".torrent");
     150    const QString path = QString::fromUtf8( myBuilder->top );
     151    const QString torrentName = QFileInfo(path).completeBaseName() + ".torrent";
    152152    myTarget = QDir( myDestination ).filePath( torrentName );
    153     std::cerr << qPrintable(myTarget) << std::endl;
    154153
    155154    // comment
     
    161160    tr_makeMetaInfo( myBuilder,
    162161                     myTarget.toUtf8().constData(),
    163                      (trackers.isEmpty() ? 0 : &trackers.front()),
     162                     (trackers.isEmpty() ? NULL : trackers.data()),
    164163                     trackers.size(),
    165164                     (comment.isEmpty() ? NULL : comment.toUtf8().constData()),
Note: See TracChangeset for help on using the changeset viewer.