File indexing completed on 2024-03-24 15:14:40
0001 /* GCompris - ApplicationInfoDefault.cpp 0002 * 0003 * SPDX-FileCopyrightText: 2014 Bruno Coudoin <bruno.coudoin@gcompris.net> 0004 * 0005 * Authors: 0006 * Bruno Coudoin <bruno.coudoin@gcompris.net> 0007 * 0008 * SPDX-License-Identifier: GPL-3.0-or-later 0009 */ 0010 0011 #include "ApplicationInfo.h" 0012 #include <QCollator> 0013 #include <QLocale> 0014 0015 bool ApplicationInfo::requestAudioFocus() const 0016 { 0017 return true; 0018 } 0019 0020 void ApplicationInfo::abandonAudioFocus() const 0021 { 0022 } 0023 0024 void ApplicationInfo::setRequestedOrientation(int orientation) 0025 { 0026 Q_UNUSED(orientation); 0027 } 0028 0029 int ApplicationInfo::getRequestedOrientation() 0030 { 0031 return -1; 0032 } 0033 0034 void ApplicationInfo::setKeepScreenOn(bool value) 0035 { 0036 Q_UNUSED(value); 0037 } 0038 0039 int ApplicationInfo::localeCompare(const QString &a, const QString &b, 0040 const QString &locale) const 0041 { 0042 QString _locale = locale.isEmpty() ? ApplicationSettings::getInstance()->locale() 0043 : locale; 0044 QLocale l = (_locale == GC_DEFAULT_LOCALE) ? QLocale::system() 0045 : QLocale(_locale); 0046 return QCollator(l).compare(a, b); 0047 } 0048 0049 bool ApplicationInfo::checkPermissions() const 0050 { 0051 return true; 0052 }