MCPcopy Create free account
hub / github.com/Atarity/Lightpack / removeCurrentProfile

Method removeCurrentProfile

Software/src/Settings.cpp:413–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413void Settings::removeCurrentProfile()
414{
415 DEBUG_LOW_LEVEL << Q_FUNC_INFO;
416
417 QMutexLocker locker(&m_mutex);
418
419 if (m_currentProfile == NULL)
420 {
421 qWarning() << Q_FUNC_INFO << "current profile not loaded, nothing to remove";
422 return;
423 }
424
425 bool result = QFile::remove( m_currentProfile->fileName() );
426
427 if (result == false)
428 {
429 qWarning() << Q_FUNC_INFO << "QFile::remove(" << m_currentProfile->fileName() << ") fail";
430 return;
431 }
432
433 delete m_currentProfile;
434 m_currentProfile = NULL;
435
436 m_mainConfig->setValue(Main::Key::ProfileLast, Main::ProfileNameDefault);
437
438 m_this->currentProfileRemoved();
439}
440
441QString Settings::getCurrentProfileName()
442{

Callers

nothing calls this directly

Calls 1

setValueMethod · 0.80

Tested by

no test coverage detected