mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-18 18:38:51 +00:00
Add Loading ~/.cutterrc (#1644)
This commit is contained in:
parent
78ff1459c9
commit
c7d582f00a
@ -116,6 +116,7 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
||||
Core()->initialize();
|
||||
Core()->setSettings();
|
||||
Config()->loadInitial();
|
||||
Core()->loadCutterRC();
|
||||
|
||||
bool analLevelSpecified = false;
|
||||
int analLevel = 0;
|
||||
|
@ -185,6 +185,22 @@ void CutterCore::initialize()
|
||||
asyncTaskManager = new AsyncTaskManager(this);
|
||||
}
|
||||
|
||||
void CutterCore::loadCutterRC()
|
||||
{
|
||||
auto home = QDir::home();
|
||||
if (!home.exists()) {
|
||||
return;
|
||||
}
|
||||
auto cutterRCFileInfo = QFileInfo(home, ".cutterrc");
|
||||
if (!cutterRCFileInfo.isFile()) {
|
||||
return;
|
||||
}
|
||||
auto path = cutterRCFileInfo.absoluteFilePath();
|
||||
qInfo() << "Loading" << path;
|
||||
r_core_cmd_file(core_, path.toUtf8().constData());
|
||||
}
|
||||
|
||||
|
||||
QList<QString> CutterCore::sdbList(QString path)
|
||||
{
|
||||
CORE_LOCK();
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
static CutterCore *instance();
|
||||
|
||||
void initialize();
|
||||
void loadCutterRC();
|
||||
|
||||
AsyncTaskManager *getAsyncTaskManager() { return asyncTaskManager; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user