mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-10-05 13:16:13 +00:00
Make qt_make_filter_list a part of file_utilities_linux.cpp
This commit is contained in:
@@ -34,34 +34,8 @@
|
||||
// For QTextItemInt declaraion
|
||||
#include <private/qtextengine_p.h>
|
||||
|
||||
#ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
|
||||
/* TODO: find a dynamic library with these symbols. */
|
||||
|
||||
/* Debian maintainer: this function is taken from qfiledialog.cpp */
|
||||
/*
|
||||
Makes a list of filters from ;;-separated text.
|
||||
Used by the mac and windows implementations
|
||||
*/
|
||||
QStringList qt_make_filter_list(const QString &filter)
|
||||
{
|
||||
QString f(filter);
|
||||
|
||||
if (f.isEmpty())
|
||||
return QStringList();
|
||||
|
||||
QString sep(QLatin1String(";;"));
|
||||
int i = f.indexOf(sep, 0);
|
||||
if (i == -1) {
|
||||
if (f.indexOf(QLatin1Char('\n'), 0) != -1) {
|
||||
sep = QLatin1Char('\n');
|
||||
i = f.indexOf(sep, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return f.split(sep);
|
||||
}
|
||||
#endif // !TDESKTOP_DISABLE_GTK_INTEGRATION
|
||||
|
||||
/* Debian maintainer: this constructor is taken from qtextengine.cpp for TextPainter::drawLine */
|
||||
QTextItemInt::QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars_, int numChars, QFontEngine *fe, const QTextCharFormat &format)
|
||||
: flags(0), justified(false), underlineStyle(QTextCharFormat::NoUnderline), charFormat(format),
|
||||
|
Reference in New Issue
Block a user