157 lines
5.4 KiB
Diff
157 lines
5.4 KiB
Diff
diff -up pulseview-0.4.0/main.cpp.gcc8 pulseview-0.4.0/main.cpp
|
|
--- pulseview-0.4.0/main.cpp.gcc8 2018-03-22 11:14:53.091197542 +0100
|
|
+++ pulseview-0.4.0/main.cpp 2018-03-22 11:14:59.971344515 +0100
|
|
@@ -207,7 +207,7 @@ int main(int argc, char *argv[])
|
|
// Run the application
|
|
ret = a.exec();
|
|
|
|
- } catch (exception e) {
|
|
+ } catch (exception& e) {
|
|
qDebug() << e.what();
|
|
}
|
|
|
|
diff -up pulseview-0.4.0/pv/binding/device.cpp.gcc8 pulseview-0.4.0/pv/binding/device.cpp
|
|
--- pulseview-0.4.0/pv/binding/device.cpp.gcc8 2018-03-22 11:20:04.437855540 +0100
|
|
+++ pulseview-0.4.0/pv/binding/device.cpp 2018-03-22 11:20:16.778114484 +0100
|
|
@@ -69,7 +69,7 @@ Device::Device(shared_ptr<sigrok::Config
|
|
string name_str;
|
|
try {
|
|
name_str = key->description();
|
|
- } catch (Error e) {
|
|
+ } catch (Error& e) {
|
|
name_str = key->name();
|
|
}
|
|
|
|
diff -up pulseview-0.4.0/pv/session.cpp.gcc8 pulseview-0.4.0/pv/session.cpp
|
|
--- pulseview-0.4.0/pv/session.cpp.gcc8 2018-03-22 11:16:23.943141834 +0100
|
|
+++ pulseview-0.4.0/pv/session.cpp 2018-03-22 11:17:07.734081970 +0100
|
|
@@ -475,7 +475,7 @@ void Session::load_file(QString file_nam
|
|
new devices::SessionFile(
|
|
device_manager_.context(),
|
|
file_name.toStdString())));
|
|
- } catch (Error e) {
|
|
+ } catch (Error& e) {
|
|
main_bar_->session_error(tr("Failed to load ") + file_name, e.what());
|
|
set_default_device();
|
|
main_bar_->update_device_list();
|
|
@@ -645,7 +645,7 @@ bool Session::add_decoder(srd_decoder *c
|
|
|
|
for (shared_ptr<views::ViewBase> view : views_)
|
|
view->add_decode_signal(signalbase);
|
|
- } catch (runtime_error e) {
|
|
+ } catch (runtime_error& e) {
|
|
return false;
|
|
}
|
|
|
|
@@ -841,7 +841,7 @@ void Session::sample_thread_proc(functio
|
|
|
|
try {
|
|
device_->start();
|
|
- } catch (Error e) {
|
|
+ } catch (Error& e) {
|
|
error_handler(e.what());
|
|
return;
|
|
}
|
|
@@ -851,7 +851,7 @@ void Session::sample_thread_proc(functio
|
|
|
|
try {
|
|
device_->run();
|
|
- } catch (Error e) {
|
|
+ } catch (Error& e) {
|
|
error_handler(e.what());
|
|
set_capture_state(Stopped);
|
|
return;
|
|
@@ -1070,7 +1070,7 @@ void Session::data_feed_in(shared_ptr<si
|
|
case SR_DF_LOGIC:
|
|
try {
|
|
feed_in_logic(dynamic_pointer_cast<Logic>(packet->payload()));
|
|
- } catch (bad_alloc) {
|
|
+ } catch (bad_alloc&) {
|
|
out_of_memory_ = true;
|
|
device_->stop();
|
|
}
|
|
@@ -1079,7 +1079,7 @@ void Session::data_feed_in(shared_ptr<si
|
|
case SR_DF_ANALOG:
|
|
try {
|
|
feed_in_analog(dynamic_pointer_cast<Analog>(packet->payload()));
|
|
- } catch (bad_alloc) {
|
|
+ } catch (bad_alloc&) {
|
|
out_of_memory_ = true;
|
|
device_->stop();
|
|
}
|
|
diff -up pulseview-0.4.0/pv/storesession.cpp.gcc8 pulseview-0.4.0/pv/storesession.cpp
|
|
--- pulseview-0.4.0/pv/storesession.cpp.gcc8 2018-03-22 11:15:34.392080308 +0100
|
|
+++ pulseview-0.4.0/pv/storesession.cpp 2018-03-22 11:15:45.682322177 +0100
|
|
@@ -175,7 +175,7 @@ bool StoreSession::start()
|
|
{{ConfigKey::SAMPLERATE, Glib::Variant<guint64>::create(
|
|
any_segment->samplerate())}});
|
|
output_->receive(meta);
|
|
- } catch (Error error) {
|
|
+ } catch (Error& error) {
|
|
error_ = tr("Error while saving: ") + error.what();
|
|
return false;
|
|
}
|
|
@@ -269,7 +269,7 @@ void StoreSession::store_proc(vector< sh
|
|
|
|
delete[] ldata;
|
|
}
|
|
- } catch (Error error) {
|
|
+ } catch (Error& error) {
|
|
error_ = tr("Error while saving: ") + error.what();
|
|
break;
|
|
}
|
|
diff -up pulseview-0.4.0/pv/views/trace/decodetrace.cpp.gcc8 pulseview-0.4.0/pv/views/trace/decodetrace.cpp
|
|
--- pulseview-0.4.0/pv/views/trace/decodetrace.cpp.gcc8 2018-03-22 11:26:24.405987117 +0100
|
|
+++ pulseview-0.4.0/pv/views/trace/decodetrace.cpp 2018-03-22 11:26:37.726274102 +0100
|
|
@@ -212,7 +212,7 @@ void DecodeTrace::paint_mid(QPainter &p,
|
|
int row_title_width;
|
|
try {
|
|
row_title_width = row_title_widths_.at(row);
|
|
- } catch (out_of_range) {
|
|
+ } catch (out_of_range&) {
|
|
const int w = p.boundingRect(QRectF(), 0, row.title()).width() +
|
|
RowTitleMargin;
|
|
row_title_widths_[row] = w;
|
|
diff -up pulseview-0.4.0/pv/toolbars/mainbar.cpp.gcc8 pulseview-0.4.0/pv/toolbars/mainbar.cpp
|
|
--- pulseview-0.4.0/pv/toolbars/mainbar.cpp.gcc8 2018-03-22 11:34:50.626877579 +0100
|
|
+++ pulseview-0.4.0/pv/toolbars/mainbar.cpp 2018-03-22 11:35:05.297192755 +0100
|
|
@@ -374,7 +374,7 @@ void MainBar::update_sample_rate_selecto
|
|
updating_sample_rate_ = true;
|
|
sample_rate_.set_value(samplerate);
|
|
updating_sample_rate_ = false;
|
|
- } catch (Error error) {
|
|
+ } catch (Error& error) {
|
|
qDebug() << "WARNING: Failed to get value of sample rate";
|
|
return;
|
|
}
|
|
@@ -514,7 +514,7 @@ void MainBar::commit_sample_rate()
|
|
sr_dev->config_set(ConfigKey::SAMPLERATE,
|
|
Glib::Variant<guint64>::create(sample_rate));
|
|
update_sample_rate_selector();
|
|
- } catch (Error error) {
|
|
+ } catch (Error& error) {
|
|
qDebug() << "Failed to configure samplerate.";
|
|
return;
|
|
}
|
|
@@ -542,7 +542,7 @@ void MainBar::commit_sample_count()
|
|
sr_dev->config_set(ConfigKey::LIMIT_SAMPLES,
|
|
Glib::Variant<guint64>::create(sample_count));
|
|
update_sample_count_selector();
|
|
- } catch (Error error) {
|
|
+ } catch (Error& error) {
|
|
qDebug() << "Failed to configure sample count.";
|
|
return;
|
|
}
|
|
diff -up pulseview-0.4.0/pv/devices/inputfile.cpp.gcc8 pulseview-0.4.0/pv/devices/inputfile.cpp
|
|
--- pulseview-0.4.0/pv/devices/inputfile.cpp.gcc8 2018-03-22 11:35:41.707975001 +0100
|
|
+++ pulseview-0.4.0/pv/devices/inputfile.cpp 2018-03-22 11:35:52.538207676 +0100
|
|
@@ -74,7 +74,7 @@ void InputFile::open()
|
|
|
|
try {
|
|
device_ = input_->device();
|
|
- } catch (sigrok::Error) {
|
|
+ } catch (sigrok::Error&) {
|
|
return;
|
|
}
|
|
|