Changeset 14349 for trunk/qt/options.h


Ignore:
Timestamp:
Dec 1, 2014, 7:24:07 PM (8 years ago)
Author:
mikedld
Message:

#5077: Remove torrent file from watch directory even if "show options dialog" is not set (patch from rb07 + some improvements)

Refactor Session::addTorrent (add new method) to eliminate duplicate
code in options.cc and ensure that FileAdded? object is being created
on torrent addition even with non-interactive workflow.
Move FileAdded? class from options.{h,cc} to session.{h,cc}.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/options.h

    r14241 r14349  
    1010#ifndef OPTIONS_DIALOG_H
    1111#define OPTIONS_DIALOG_H
    12 
    13 #include <iostream>
    1412
    1513#include <QDialog>
     
    4240  struct tr_variant;
    4341}
    44 
    45 class FileAdded: public QObject
    46 {
    47     Q_OBJECT
    48 
    49   public:
    50     FileAdded (int tag, const QString& name): myTag (tag), myName (name) {}
    51     ~FileAdded () {}
    52     void setFileToDelete (const QString& file) { myDelFile = file; }
    53 
    54   public slots:
    55     void executed (int64_t tag, const QString& result, struct tr_variant * arguments);
    56 
    57   private:
    58     const int64_t myTag;
    59     QString myName;
    60     QString myDelFile;
    61 };
    6242
    6343class Options: public QDialog
Note: See TracChangeset for help on using the changeset viewer.