From 4ec69237e6b777df818bc95bd46a58448340b30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Dole=C5=BEel?= Date: Sat, 4 Jul 2015 22:11:12 +0200 Subject: Replaced Boost regex dependency with C++11 regex --- src/gui/CMakeLists.txt | 2 +- src/gui/numberconversionform.cpp | 4 ++-- src/gui/userprofileform.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui') diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 57b8a19..c178b9c 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -134,7 +134,7 @@ add_executable(twinkle ${TWINKLE_GUI-SRCS}) target_link_libraries(twinkle -lpthread -lresolv ${LibMagic_LIBRARY} ${LIBXML2_LIBRARIES} ${Readline_LIBRARY} ${ILBC_LIBRARIES} ${SPEEX_LIBRARIES} ${ZRTPCPP_LIBRARIES} ${CCRTP_LIBRARIES} ${COMMONCPP_LIBRARIES} ${UCOMMON_LIBRARIES} ${LIBSNDFILE_LIBRARY} - ${Boost_LIBRARIES} ${ALSA_LIBRARY} ${qt_LIBS} ${G729_LIBRARY}) + ${ALSA_LIBRARY} ${qt_LIBS} ${G729_LIBRARY}) install(TARGETS twinkle DESTINATION bin) install(FILES ${twinkle_LANG} DESTINATION share/twinkle/lang) diff --git a/src/gui/numberconversionform.cpp b/src/gui/numberconversionform.cpp index af95dd2..f8ae64c 100644 --- a/src/gui/numberconversionform.cpp +++ b/src/gui/numberconversionform.cpp @@ -67,8 +67,8 @@ void NumberConversionForm::validate() } try { - boost::regex re(expr.toStdString()); - } catch (boost::bad_expression) { + std::regex re(expr.toStdString()); + } catch (std::regex_error) { ((t_gui *)ui)->cb_show_msg(this, tr("Invalid regular expression.").toStdString(), MSG_CRITICAL); exprLineEdit->setFocus(); diff --git a/src/gui/userprofileform.cpp b/src/gui/userprofileform.cpp index d7f39a0..788d87b 100644 --- a/src/gui/userprofileform.cpp +++ b/src/gui/userprofileform.cpp @@ -598,7 +598,7 @@ void UserProfileForm::populate() int j = 0; for (list::reverse_iterator i = conversions.rbegin(); i != conversions.rend(); i++, j++) { - QTableWidgetItem* item = new QTableWidgetItem(QString::fromStdString(i->re.str())); + QTableWidgetItem* item = new QTableWidgetItem(QString::fromStdString(i->re)); conversionListView->setItem(j, 0, item); item = new QTableWidgetItem(QString::fromStdString(i->fmt)); conversionListView->setItem(j, 1, item); @@ -712,7 +712,7 @@ list UserProfileForm::get_number_conversions() item = conversionListView->item(0, 1); c.fmt = item->text().toStdString(); conversions.push_back(c); - } catch (boost::bad_expression) { + } catch (std::regex_error) { // Should never happen as validity has been // checked already. Just being defensive here. } -- cgit v1.2.3