mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-03 03:36:58 -04:00
moved FileDetail structure in SearchDialog where it belongs
This commit is contained in:
parent
2a1991fe85
commit
e8187dbeab
4 changed files with 15 additions and 6 deletions
|
@ -86,6 +86,18 @@ const int SearchDialog::FILETYPE_IDX_DIRECTORY = 8;
|
|||
QMap<int, QString> * SearchDialog::FileTypeExtensionMap = new QMap<int, QString>();
|
||||
bool SearchDialog::initialised = false;
|
||||
|
||||
struct SearchDialog::FileDetail
|
||||
{
|
||||
public:
|
||||
RsPeerId id;
|
||||
std::string name;
|
||||
RsFileHash hash;
|
||||
std::string path;
|
||||
uint64_t size;
|
||||
uint32_t mtime;
|
||||
uint32_t rank;
|
||||
};
|
||||
|
||||
/** Constructor */
|
||||
SearchDialog::SearchDialog(QWidget *parent)
|
||||
: MainPage(parent),
|
||||
|
@ -968,7 +980,7 @@ void SearchDialog::searchKeywords(const QString& keywords)
|
|||
}
|
||||
}
|
||||
|
||||
void SearchDialog::updateFiles(qulonglong search_id,FileDetail file)
|
||||
void SearchDialog::updateFiles(qulonglong search_id,const FileDetail& file)
|
||||
{
|
||||
searchResultsQueue.push_back(std::pair<qulonglong,FileDetail>(search_id,file)) ;
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ class SearchDialog : public MainPage
|
|||
Q_PROPERTY(QColor textColorLowSources READ textColorLowSources WRITE setTextColorLowSources)
|
||||
Q_PROPERTY(QColor textColorHighSources READ textColorHighSources WRITE setTextColorHighSources)
|
||||
|
||||
struct FileDetail; // useful structure to store search results.
|
||||
public:
|
||||
/** Default Constructor */
|
||||
SearchDialog(QWidget *parent = 0);
|
||||
|
@ -63,8 +64,7 @@ public:
|
|||
void setTextColorLowSources(QColor color) { mTextColorLowSources = color; }
|
||||
void setTextColorHighSources(QColor color) { mTextColorHighSources = color; }
|
||||
|
||||
public slots:
|
||||
void updateFiles(qulonglong request_id,FileDetail file) ;
|
||||
void updateFiles(qulonglong request_id, const FileDetail& file) ;
|
||||
|
||||
private slots:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue