statusBar()->showMessage("Welcome to mussa", 2000);
// FIXME: we should start refactoring the connect call to updateAnalysis or something
if (analysis) {
- connect(analysis.get(), SIGNAL(progress(const std::string&, int, int)),
- this, SLOT(updateProgress(const std::string&, int, int)));
+ connect(analysis.get(), SIGNAL(progress(const QString&, int, int)),
+ this, SLOT(updateProgress(const QString&, int, int)));
connect(analysis.get(), SIGNAL(isModified(bool)),
this, SLOT(updateAnalysisModified(bool)));
}
// but this should work for the moment.
if (not isClearingAnalysisSafe()) return;
- MussaRef m(new Mussa);
+ MussaRef m = Mussa::init();
fs::path converted_path(mupa_path.toStdString(), fs::native);
- connect(m.get(), SIGNAL(progress(const std::string&, int, int)),
- this, SLOT(updateProgress(const std::string&, int, int)));
+ connect(m.get(), SIGNAL(progress(const QString&, int, int)),
+ this, SLOT(updateProgress(const QString&, int, int)));
m->load_mupa_file(converted_path);
m->analyze();
setAnalysis(m);
// but this should work for the moment.
if (not isClearingAnalysisSafe()) return;
- MussaRef m(new Mussa);
+ MussaRef m = Mussa::init();
fs::path converted_path(muway_dir.toStdString(), fs::native);
- connect(m.get(), SIGNAL(progress(const std::string&, int, int)),
- this, SLOT(updateProgress(const std::string&, int, int)));
+ connect(m.get(), SIGNAL(progress(const QString&, int, int)),
+ this, SLOT(updateProgress(const QString&, int, int)));
m->load(converted_path);
// only switch mussas if we loaded without error
if (analysis->empty()) {
void MussaWindow::newMussaWindow()
{
- MussaRef a(new Mussa);
- MussaWindow *win = new MussaWindow(a);
+ MussaWindow *win = new MussaWindow(Mussa::init());
win->default_dir = default_dir;
win->show();
}
}
void
-MussaWindow::updateProgress(const string& description, int current, int max)
+MussaWindow::updateProgress(const QString& description, int current, int max)
{
// if we're done
if (current == max) {
} else {
// if we're starting, create the dialog
if (progress_dialog == 0) {
- QString desc(description.c_str());
QString cancel("Cancel");
- progress_dialog = new QProgressDialog(desc, cancel, current, max, this);
+ progress_dialog = new QProgressDialog(description, cancel, current, max, this);
progress_dialog->show();
} else {
// just update the dialog