the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
+
+#include "klipper.h"
#include "historyimageitem.h"
#include <QtCore/QMimeData>
QByteArray buffer;
QDataStream out(&buffer, QIODevice::WriteOnly);
out << data;
- return QCryptographicHash::hash(buffer, QCryptographicHash::Sha1);
+ return QCryptographicHash::hash(buffer, KlipperHashAlhorithm);
}
}
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
+
+#include "klipper.h"
#include "historystringitem.h"
#include <QCryptographicHash>
HistoryStringItem::HistoryStringItem( const QString& data )
- : HistoryItem(QCryptographicHash::hash(data.toUtf8(), QCryptographicHash::Sha1))
+ : HistoryItem(QCryptographicHash::hash(data.toUtf8(), KlipperHashAlhorithm))
, m_data( data )
{
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
+
+#include "klipper.h"
#include "historyurlitem.h"
#include <QtCore/QMimeData>
namespace {
QByteArray compute_uuid(const KUrl::List& _urls, KUrl::MetaDataMap _metaData, bool _cut ) {
- QCryptographicHash hash(QCryptographicHash::Sha1);
+ QCryptographicHash hash(KlipperHashAlhorithm);
foreach(const KUrl& url, _urls) {
hash.addData(url.toEncoded());
hash.addData("\0", 1); // Use binary zero as that is not a valid path character
//#define NOISY_KLIPPER
-#if QT_VERSION >= 0x041200
-static const QCryptographicHash::Algorithm KlipperHashAlhorithm = QCryptographicHash::KAT;
-#else
-static const QCryptographicHash::Algorithm KlipperHashAlhorithm = QCryptographicHash::Sha1;
-#endif
-
namespace {
/**
* Use this when manipulating the clipboard
#ifndef KLIPPER_H
#define KLIPPER_H
-#include <QtCore/qdatetime.h>
-#include <QtCore/QTimer>
-#include <QtGui/QClipboard>
+#include <QTime>
+#include <QAction>
+#include <QMenu>
+#include <QMimeData>
+#include <QDateTime>
+#include <QTimer>
+#include <QClipboard>
+#include <QCryptographicHash>
#include <KGlobal>
#include "urlgrabber.h"
+#if QT_VERSION >= 0x041200
+static const QCryptographicHash::Algorithm KlipperHashAlhorithm = QCryptographicHash::KAT;
+#else
+static const QCryptographicHash::Algorithm KlipperHashAlhorithm = QCryptographicHash::Sha1;
+#endif
+
class KAction;
class KToggleAction;
class KAboutData;
class KActionCollection;
class URLGrabber;
-#include <QTime>
class History;
-#include <QAction>
-#include <QMenu>
-#include <QMimeData>
class HistoryItem;
class KlipperSessionManager;