File indexing completed on 2024-04-28 04:37:34

0001 /*
0002     SPDX-FileCopyrightText: 2013 Kevin Funk <kfunk@kde.org
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "autotestshell.h"
0008 
0009 #include <QStandardPaths>
0010 
0011 using namespace KDevelop;
0012 
0013 AutoTestShell::~AutoTestShell() = default;
0014 
0015 void AutoTestShell::init(const QStringList& plugins)
0016 {
0017     // TODO: Maybe generalize, add KDEVELOP_STANDALONE build option
0018     qputenv("CLEAR_DUCHAIN_DIR", "1"); // Always clear duchain dir (also to avoid popups asking the user to clear it)
0019 
0020     QStandardPaths::setTestModeEnabled(true);
0021 
0022     static auto instance = AutoTestShell();
0023     instance.m_plugins = plugins;
0024     s_instance = &instance;
0025 }