forked from qt-creator/qt-creator
File drag&drop: Move mime data creation to central place
Especially when this gets more complicated with additional fancy windows mime types and custom mime type for opening a file at a specific location (dropping from Outline, Type Hierarchy et al), we should not create that complex mime data everywhere by hand. Change-Id: I37f6ceb287b0cd055501fdd033ac29816434a020 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -41,6 +41,7 @@ namespace Utils {class FileName; }
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QFile;
|
||||
class QMimeData;
|
||||
class QTemporaryFile;
|
||||
class QWidget;
|
||||
class QTextStream;
|
||||
@@ -199,6 +200,10 @@ class QTCREATOR_UTILS_EXPORT FileDropSupport : public QObject
|
||||
public:
|
||||
FileDropSupport(QWidget *parentWidget);
|
||||
|
||||
static QStringList mimeTypesForFilePaths();
|
||||
static QMimeData *mimeDataForFilePaths(const QStringList &filePaths);
|
||||
static QMimeData *mimeDataForFilePath(const QString &filePath);
|
||||
|
||||
signals:
|
||||
void filesDropped(const QStringList &files);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user