mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-26 23:29:23 -05:00
UI: Open active profile directory via File menu
This commit is contained in:
committed by
Ryan Foster
parent
038c91d823
commit
0be9d9ff79
@@ -167,8 +167,6 @@ template<typename T> static void SetOBSRef(QListWidgetItem *item, T &&val)
|
||||
item->setData(static_cast<int>(QtDataRole::OBSRef), QVariant::fromValue(val));
|
||||
}
|
||||
|
||||
constexpr std::string_view OBSProfilePath = "/obs-studio/basic/profiles/";
|
||||
|
||||
static void AddExtraModulePaths()
|
||||
{
|
||||
string plugins_path, plugins_data_path;
|
||||
@@ -7627,13 +7625,14 @@ void OBSBasic::on_actionShowSettingsFolder_triggered()
|
||||
|
||||
void OBSBasic::on_actionShowProfileFolder_triggered()
|
||||
{
|
||||
std::string userProfilePath;
|
||||
userProfilePath.reserve(App()->userProfilesLocation.u8string().size() + OBSProfilePath.size());
|
||||
userProfilePath.append(App()->userProfilesLocation.u8string()).append(OBSProfilePath);
|
||||
try {
|
||||
const OBSProfile ¤tProfile = GetCurrentProfile();
|
||||
QString currentProfileLocation = QString::fromStdString(currentProfile.path.u8string());
|
||||
|
||||
const QString userProfileLocation = QString::fromStdString(userProfilePath);
|
||||
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(userProfileLocation));
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(currentProfileLocation));
|
||||
} catch (const std::invalid_argument &error) {
|
||||
blog(LOG_ERROR, "%s", error.what());
|
||||
}
|
||||
}
|
||||
|
||||
int OBSBasic::GetTopSelectedSourceItem()
|
||||
|
||||
Reference in New Issue
Block a user