Merge pull request #383 from RobotCaleb/ViewLogMenuEntry
View Log menu entry in Help -> Log Files menu
This commit is contained in:
commit
fe144c891d
@ -207,6 +207,7 @@ Basic.MainMenu.Help.Logs="&Log Files"
|
||||
Basic.MainMenu.Help.Logs.ShowLogs="&Show Log Files"
|
||||
Basic.MainMenu.Help.Logs.UploadCurrentLog="Upload &Current Log File"
|
||||
Basic.MainMenu.Help.Logs.UploadLastLog="Upload &Last Log File"
|
||||
Basic.MainMenu.Help.Logs.ViewCurrentLog="&View Current Log"
|
||||
Basic.MainMenu.Help.CheckForUpdates="Check For Updates"
|
||||
|
||||
# basic mode settings dialog
|
||||
|
@ -581,6 +581,7 @@
|
||||
<addaction name="actionShowLogs"/>
|
||||
<addaction name="actionUploadCurrentLog"/>
|
||||
<addaction name="actionUploadLastLog"/>
|
||||
<addaction name="actionViewCurrentLog"/>
|
||||
</widget>
|
||||
<addaction name="menuLogFiles"/>
|
||||
<addaction name="actionCheckForUpdates"/>
|
||||
@ -806,6 +807,11 @@
|
||||
<string>Basic.MainMenu.Help.Logs.UploadCurrentLog</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionViewCurrentLog">
|
||||
<property name="text">
|
||||
<string>Basic.MainMenu.Help.Logs.ViewCurrentLog</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionUndo">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
|
@ -2111,6 +2111,22 @@ void OBSBasic::on_actionUploadLastLog_triggered()
|
||||
UploadLog(App()->GetLastLog());
|
||||
}
|
||||
|
||||
void OBSBasic::on_actionViewCurrentLog_triggered()
|
||||
{
|
||||
char logDir[512];
|
||||
if (os_get_config_path(logDir, sizeof(logDir), "obs-studio/logs") <= 0)
|
||||
return;
|
||||
|
||||
const char* log = App()->GetCurrentLog();
|
||||
|
||||
string path = (char*)logDir;
|
||||
path += "/";
|
||||
path += log;
|
||||
|
||||
QUrl url = QUrl::fromLocalFile(QT_UTF8(path.c_str()));
|
||||
QDesktopServices::openUrl(url);
|
||||
}
|
||||
|
||||
void OBSBasic::on_actionCheckForUpdates_triggered()
|
||||
{
|
||||
CheckForUpdates();
|
||||
|
@ -238,6 +238,7 @@ private slots:
|
||||
void on_actionShowLogs_triggered();
|
||||
void on_actionUploadCurrentLog_triggered();
|
||||
void on_actionUploadLastLog_triggered();
|
||||
void on_actionViewCurrentLog_triggered();
|
||||
void on_actionCheckForUpdates_triggered();
|
||||
|
||||
void on_actionEditTransform_triggered();
|
||||
|
Loading…
x
Reference in New Issue
Block a user