mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-28 17:34:44 +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()->initialize();
|
||||||
Core()->setSettings();
|
Core()->setSettings();
|
||||||
Config()->loadInitial();
|
Config()->loadInitial();
|
||||||
|
Core()->loadCutterRC();
|
||||||
|
|
||||||
bool analLevelSpecified = false;
|
bool analLevelSpecified = false;
|
||||||
int analLevel = 0;
|
int analLevel = 0;
|
||||||
|
@ -185,6 +185,22 @@ void CutterCore::initialize()
|
|||||||
asyncTaskManager = new AsyncTaskManager(this);
|
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)
|
QList<QString> CutterCore::sdbList(QString path)
|
||||||
{
|
{
|
||||||
CORE_LOCK();
|
CORE_LOCK();
|
||||||
|
@ -44,6 +44,7 @@ public:
|
|||||||
static CutterCore *instance();
|
static CutterCore *instance();
|
||||||
|
|
||||||
void initialize();
|
void initialize();
|
||||||
|
void loadCutterRC();
|
||||||
|
|
||||||
AsyncTaskManager *getAsyncTaskManager() { return asyncTaskManager; }
|
AsyncTaskManager *getAsyncTaskManager() { return asyncTaskManager; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user