mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Move MimeType from utils to core/mime_type.
Also move to Core namespace.
This commit is contained in:
@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <cmath>
|
||||
#include <set>
|
||||
#include "logs.h"
|
||||
#include "core/basic_types.h"
|
||||
@@ -435,35 +436,6 @@ enum DBIPeerReportSpamStatus {
|
||||
dbiprsRequesting = 5, // requesting the cloud setting right now
|
||||
};
|
||||
|
||||
class MimeType {
|
||||
public:
|
||||
enum class Known {
|
||||
Unknown,
|
||||
TDesktopTheme,
|
||||
TDesktopPalette,
|
||||
WebP,
|
||||
};
|
||||
|
||||
MimeType(const QMimeType &type) : _typeStruct(type) {
|
||||
}
|
||||
MimeType(Known type) : _type(type) {
|
||||
}
|
||||
QStringList globPatterns() const;
|
||||
QString filterString() const;
|
||||
QString name() const;
|
||||
|
||||
private:
|
||||
QMimeType _typeStruct;
|
||||
Known _type = Known::Unknown;
|
||||
|
||||
};
|
||||
|
||||
MimeType mimeTypeForName(const QString &mime);
|
||||
MimeType mimeTypeForFile(const QFileInfo &file);
|
||||
MimeType mimeTypeForData(const QByteArray &data);
|
||||
|
||||
#include <cmath>
|
||||
|
||||
inline int rowscount(int fullCount, int countPerRow) {
|
||||
return (fullCount + countPerRow - 1) / countPerRow;
|
||||
}
|
||||
|
Reference in New Issue
Block a user