Skip to content

Commit 992abba

Browse files
authored
Merge pull request #2732 from cmaughan/hotfixes/sample_path
Fix lookup of samples
2 parents bc490a2 + 47759cd commit 992abba

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

app/gui/qt/mainwindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ MainWindow::MainWindow(QApplication& app, bool i18n, QSplashScreen* splash)
165165
initDocsWindow();
166166

167167
//setup autocompletion
168-
autocomplete->loadSamples(sample_path);
168+
autocomplete->loadSamples(QString::fromStdString(m_spAPI->GetPath(SonicPiPath::SamplePath)));
169169

170170
QThreadPool::globalInstance()->setMaxThreadCount(3);
171171

@@ -248,8 +248,8 @@ void MainWindow::checkForStudioMode()
248248
std::cout << "[GUI] - Fetching Studio hashes" << std::endl;
249249
QProcess* fetchStudioHashes = new QProcess();
250250
QStringList fetch_studio_hashes_send_args;
251-
fetch_studio_hashes_send_args << fetch_url_path << "http://sonic-pi.net/static/info/studio-hashes.txt";
252-
fetchStudioHashes->start(ruby_path, fetch_studio_hashes_send_args);
251+
fetch_studio_hashes_send_args << QString::fromStdString(m_spAPI->GetPath(SonicPiPath::FetchUrlPath)) << "http://sonic-pi.net/static/info/studio-hashes.txt";
252+
fetchStudioHashes->start(QString::fromStdString(m_spAPI->GetPath(SonicPiPath::RubyPath)), fetch_studio_hashes_send_args);
253253
fetchStudioHashes->waitForFinished();
254254
QTextStream stream(fetchStudioHashes->readAllStandardOutput().trimmed());
255255
QString line = stream.readLine();

app/gui/qt/mainwindow.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,11 @@ class MainWindow : public QMainWindow
400400
std::ofstream stdlog;
401401

402402
ScintillaAPI *autocomplete;
403-
QString fetch_url_path, sample_path, log_path, sp_user_path, sp_user_tmp_path, ruby_server_path, ruby_path, server_error_log_path, server_output_log_path, gui_log_path, scsynth_log_path, init_script_path, exit_script_path, tmp_file_store, process_log_path, port_discovery_path, qt_app_theme_path, qt_browser_dark_css, qt_browser_light_css, qt_browser_hc_css;
403+
#ifdef QT_OLD_API
404+
QString fetch_url_path, sample_path, log_path, sp_user_path, sp_user_tmp_path, ruby_server_path, ruby_path, server_error_log_path, server_output_log_path, gui_log_path, scsynth_log_path, init_script_path, exit_script_path, tmp_file_store, process_log_path, port_discovery_path;
405+
#endif
406+
QString qt_browser_dark_css, qt_browser_light_css, qt_browser_hc_css, qt_app_theme_path;
407+
404408
QString defaultTextBrowserStyle;
405409

406410
QString version;

0 commit comments

Comments
 (0)