File indexing completed on 2025-03-02 05:02:00

0001 /*
0002   Copyright (C) 2010 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
0003   Copyright (c) 2010 Leo Franchi <lfranchi@kde.org>
0004 
0005   This library is free software; you can redistribute it and/or modify it
0006   under the terms of the GNU Library General Public License as published by
0007   the Free Software Foundation; either version 2 of the License, or (at your
0008   option) any later version.
0009 
0010   This library is distributed in the hope that it will be useful, but WITHOUT
0011   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0012   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
0013   License for more details.
0014 
0015   You should have received a copy of the GNU Library General Public License
0016   along with this library; see the file COPYING.LIB.  If not, write to the
0017   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
0018   02110-1301, USA.
0019 */
0020 
0021 #include "setupenv.h"
0022 
0023 #include <QStandardPaths>
0024 
0025 #include <QFile>
0026 #include <QDir>
0027 
0028 void MimeTreeParser::Test::setupEnv()
0029 {
0030     qputenv("LC_ALL", "C");
0031     qputenv("KDEHOME", QFile::encodeName(QDir::homePath() + QString::fromLatin1("/.qttest")).constData());
0032     QStandardPaths::setTestModeEnabled(true);
0033 }
0034