mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 16:09:35 -05:00
clear chat history bug fix (tracker 2992786)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4013 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e972ddea3e
commit
f55391f7e4
@ -20,6 +20,7 @@
|
|||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
|
||||||
#include "IMHistoryKeeper.h"
|
#include "IMHistoryKeeper.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QIODevice>
|
#include <QIODevice>
|
||||||
@ -249,6 +250,14 @@ void IMHistoryKeeper::removeMessages(QList<int> &hiids)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IMHistoryKeeper::clearHistory(){
|
||||||
|
|
||||||
|
IMHistoryWriter wri;
|
||||||
|
if(!wri.remove(hfName))
|
||||||
|
std::cerr << "\nFailed to remove history file" << std::endl;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
void IMHistoryKeeper::saveHistory()
|
void IMHistoryKeeper::saveHistory()
|
||||||
|
@ -93,6 +93,9 @@ public:
|
|||||||
//! Remove items
|
//! Remove items
|
||||||
void removeMessages(QList<int> &hiids);
|
void removeMessages(QList<int> &hiids);
|
||||||
|
|
||||||
|
//! Remove history
|
||||||
|
void clearHistory(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool loadHistoryFile();
|
bool loadHistoryFile();
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ public:
|
|||||||
bool write(QList<IMHistoryItem>& itemList,
|
bool write(QList<IMHistoryItem>& itemList,
|
||||||
const QString fileName );
|
const QString fileName );
|
||||||
|
|
||||||
|
//! remove history file
|
||||||
|
bool remove(const QString& fileName);
|
||||||
|
|
||||||
QString errorMessage();
|
QString errorMessage();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user