diff --git a/gui/gui.qrc b/gui/gui.qrc index c6d12b84c..e3f930927 100644 --- a/gui/gui.qrc +++ b/gui/gui.qrc @@ -26,5 +26,11 @@ images/go-previous.png images/applications-development.png images/applications-system.png + + ../cfg/gtk.cfg + ../cfg/qt.cfg + ../cfg/posix.cfg + ../cfg/std.cfg + ../cfg/windows.cfg diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 1bef8a81a..90a5ee947 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include "mainwindow.h" #include "cppcheck.h" #include "applicationlist.h" @@ -531,6 +532,14 @@ bool MainWindow::LoadLibrary(Library *library, QString filename) if (library->load(NULL, (path+"/"+filename).toLatin1())) return true; + // Try to load resource.. + QFile f(":/cfg/" + filename); + if (f.open(QIODevice::ReadOnly | QIODevice::Text)) { + QString data = f.readAll(); + if (library->loadxmldata(data.toLatin1(), data.length())) + return true; + } + return false; }