MCPcopy Create free account
hub / github.com/KDE/kdevelop / verifySessionDir

Function verifySessionDir

kdevplatform/shell/tests/test_sessioncontroller.cpp:27–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25//////////////////// Helper Functions ////////////////////////////////////////
26
27void verifySessionDir( const QString& sessiondir, const QString& name, bool exists )
28{
29 if( exists )
30 {
31 qDebug() << "checking existing session" << sessiondir;
32 QVERIFY( QFileInfo::exists( sessiondir ) );
33 QVERIFY( QFileInfo( sessiondir ).isDir() );
34 QVERIFY( QFileInfo::exists( sessiondir+"/sessionrc" ) );
35 KSharedConfigPtr cfg = KSharedConfig::openConfig( sessiondir+"/sessionrc" );
36 QCOMPARE( name, cfg->group("").readEntry( Session::cfgSessionNameEntry, "" ) );
37 } else {
38 qDebug() << "checking not-existing dir: " << sessiondir;
39 QVERIFY( !QFileInfo::exists( sessiondir ) );
40 }
41}
42
43void verifySessionDir( ISession* s, bool exists = true )
44{

Callers 6

createSessionMethod · 0.85
renameSessionMethod · 0.85
deleteSessionMethod · 0.85
cloneSessionMethod · 0.85
temporaryMethod · 0.85

Calls 4

readEntryMethod · 0.80
dataDirectoryMethod · 0.80
QFileInfoClass · 0.50
nameMethod · 0.45

Tested by

no test coverage detected