File indexing completed on 2025-03-09 04:54:34

0001 /*
0002   SPDX-FileCopyrightText: 2010 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
0003   SPDX-FileCopyrightText: 2010 Leo Franchi <lfranchi@kde.org>
0004 
0005   SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #include "setupenv.h"
0009 #include "messagepartthemes/default/messagepartrendererfactory.h"
0010 
0011 #include <QStandardPaths>
0012 
0013 #include <QIcon>
0014 #include <QLocale>
0015 
0016 void MessageViewer::Test::setupEnv()
0017 {
0018     qputenv("TZ", "UTC");
0019     QStandardPaths::setTestModeEnabled(true);
0020     QIcon::setThemeName(QStringLiteral("breeze"));
0021     QLocale::setDefault(QLocale(QStringLiteral("en_US")));
0022 
0023     // disable plugin loading, so kdepim-addons doesn't interfere with our tests
0024     MessagePartRendererFactory::instance()->setPluginPath(QString());
0025 }