Skip to content

Commit

Permalink
Remove deprecated throw specifiers
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.abisource.com/svnroot/abiword/trunk@35445 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
  • Loading branch information
hfiguiere committed Nov 22, 2017
1 parent e2621ec commit ef29fc9
Show file tree
Hide file tree
Showing 14 changed files with 123 additions and 124 deletions.
34 changes: 17 additions & 17 deletions plugins/aiksaurus/aiksaurusgtk3/AiksaurusGTK.cpp
Expand Up @@ -51,15 +51,15 @@ namespace AiksaurusGTK_impl
DialogImpl();
virtual ~DialogImpl();

const char* runThesaurus(const char* word) throw();
void setTitle(const char* title) throw();
void setReplacebar(bool replacebar) throw();
void setInitialMessage(const char* message) throw(std::bad_alloc);

void eventCancel() throw();
void eventReplace(const char* replacement) throw();
void eventSelectWord(const char* word) throw();
void eventSearch(const char* word) throw();
const char* runThesaurus(const char* word) noexcept(false);
void setTitle(const char* title) noexcept(false);
void setReplacebar(bool replacebar) noexcept(false);
void setInitialMessage(const char* message) noexcept(false);

void eventCancel() noexcept(false);
void eventReplace(const char* replacement) noexcept(false);
void eventSelectWord(const char* word) noexcept(false);
void eventSearch(const char* word) noexcept(false);
};


Expand All @@ -78,13 +78,13 @@ namespace AiksaurusGTK_impl
}


void DialogImpl::setReplacebar(bool replacebar) throw()
void DialogImpl::setReplacebar(bool replacebar) noexcept(false)
{
d_showreplacebar = replacebar;
}


void DialogImpl::setInitialMessage(const char* message) throw(std::bad_alloc)
void DialogImpl::setInitialMessage(const char* message) noexcept(false)
{
d_initialMessage = message;
}
Expand Down Expand Up @@ -149,7 +149,7 @@ namespace AiksaurusGTK_impl
}


const char* DialogImpl::runThesaurus(const char* word) throw()
const char* DialogImpl::runThesaurus(const char* word) noexcept(false)
{
try {

Expand Down Expand Up @@ -180,7 +180,7 @@ namespace AiksaurusGTK_impl
}


void DialogImpl::setTitle(const char* word) throw()
void DialogImpl::setTitle(const char* word) noexcept(false)
{
try {
d_title = (word) ? (word) : ("");
Expand All @@ -191,13 +191,13 @@ namespace AiksaurusGTK_impl
}


void DialogImpl::eventCancel() throw()
void DialogImpl::eventCancel() noexcept(false)
{
gtk_main_quit();
}


void DialogImpl::eventReplace(const char* replacement) throw()
void DialogImpl::eventReplace(const char* replacement) noexcept(false)
{
try {
d_replacement = replacement;
Expand All @@ -209,14 +209,14 @@ namespace AiksaurusGTK_impl
}


void DialogImpl::eventSelectWord(const char* word) throw()
void DialogImpl::eventSelectWord(const char* word) noexcept(false)
{
if (d_replacebar_ptr)
d_replacebar_ptr->setText(word);
}


void DialogImpl::eventSearch(const char* word) throw()
void DialogImpl::eventSearch(const char* word) noexcept(false)
{
try {
std::string w( (word) ? (word) : ("") );
Expand Down
8 changes: 4 additions & 4 deletions plugins/aiksaurus/aiksaurusgtk3/DialogMediator.h
Expand Up @@ -26,10 +26,10 @@ namespace AiksaurusGTK_impl
class DialogMediator
{
public:
virtual void eventCancel() throw() = 0;
virtual void eventReplace(const char* replacement) throw() = 0;
virtual void eventSelectWord(const char* word) throw() = 0;
virtual void eventSearch(const char* word) throw() = 0;
virtual void eventCancel() noexcept(false) = 0;
virtual void eventReplace(const char* replacement) noexcept(false) = 0;
virtual void eventSelectWord(const char* word) noexcept(false) = 0;
virtual void eventSearch(const char* word) noexcept(false) = 0;
};
}

Expand Down
28 changes: 14 additions & 14 deletions plugins/aiksaurus/aiksaurusgtk3/Display.cpp
Expand Up @@ -29,7 +29,7 @@ using namespace std;
namespace AiksaurusGTK_impl
{

Display::Display(DialogMediator& mediator) throw()
Display::Display(DialogMediator& mediator) noexcept(false)
: d_mediator(mediator)
{
// ensure that styles are set up.
Expand Down Expand Up @@ -61,7 +61,7 @@ namespace AiksaurusGTK_impl
}


Display::~Display() throw()
Display::~Display() noexcept(false)
{
for(int i = 0;i < static_cast<int>(d_meanings.size());++i)
{
Expand All @@ -71,15 +71,15 @@ namespace AiksaurusGTK_impl


void Display::_createMeaning(const string& title, vector<string>& words)
throw(std::bad_alloc)
noexcept(false)
{
Meaning *mean = new Meaning(title, words, *this);
d_meanings.push_back(mean);
gtk_box_pack_start(GTK_BOX(d_layout), mean->getLayout(), 0, 0, 0);
}


void Display::_resetDisplay() throw()
void Display::_resetDisplay() noexcept(false)
{
// Recreate our layout widget.
if (d_layout)
Expand All @@ -96,7 +96,7 @@ namespace AiksaurusGTK_impl
d_meanings.clear();
}

void Display::_displayResults(const char* word) throw(Exception, std::bad_alloc)
void Display::_displayResults(const char* word) noexcept(false)
{
_checkThesaurus();

Expand Down Expand Up @@ -135,7 +135,7 @@ namespace AiksaurusGTK_impl



void Display::_checkThesaurus() throw(Exception)
void Display::_checkThesaurus() noexcept(false)
{
if (d_thesaurus.error()[0])
{
Expand All @@ -151,7 +151,7 @@ namespace AiksaurusGTK_impl
}

void Display::_displayAlternatives()
throw(Exception, std::bad_alloc)
noexcept(false)
{
_checkThesaurus();
vector<string> words;
Expand All @@ -165,7 +165,7 @@ namespace AiksaurusGTK_impl
}


void Display::showMessage(const char* message) throw()
void Display::showMessage(const char* message) noexcept(false)
{
_resetDisplay();
GtkWidget* label = gtk_label_new(message);
Expand All @@ -174,7 +174,7 @@ namespace AiksaurusGTK_impl
gtk_widget_show_all(d_layout);
}

void Display::search(const char* word) throw(std::bad_alloc)
void Display::search(const char* word) noexcept(false)
{
try
{
Expand All @@ -195,7 +195,7 @@ namespace AiksaurusGTK_impl
}


void Display::_handleClick(bool isDoubleClick, const char* text) throw(std::bad_alloc)
void Display::_handleClick(bool isDoubleClick, const char* text) noexcept(false)
{
string str(text); // might throw

Expand All @@ -206,7 +206,7 @@ namespace AiksaurusGTK_impl
}


void Display::_handleSelection(GtkWidget* list) throw()
void Display::_handleSelection(GtkWidget* list) noexcept(false)
{
for(int i = 0;i < static_cast<int>(d_meanings.size());++i)
{
Expand All @@ -215,13 +215,13 @@ namespace AiksaurusGTK_impl
}


GtkWidget* Display::getDisplay() throw()
GtkWidget* Display::getDisplay() noexcept(false)
{
return d_scroller;
}


const Aiksaurus& Display::getThesaurus() const throw()
const Aiksaurus& Display::getThesaurus() const noexcept(false)
{
return d_thesaurus;
}
Expand All @@ -233,7 +233,7 @@ namespace AiksaurusGTK_impl
// To do this, we have to set up a resource first so that the
// styles mean what we want them to mean.
//
void Display::_initResources() throw()
void Display::_initResources() noexcept(false)
{
// Execute this code only once.
static bool done = false;
Expand Down
28 changes: 14 additions & 14 deletions plugins/aiksaurus/aiksaurusgtk3/Display.h
Expand Up @@ -32,30 +32,30 @@ namespace AiksaurusGTK_impl
GtkWidget* d_layout;
std::vector<Meaning*> d_meanings;

void _handleSelection(GtkWidget* list) throw();
void _handleClick(bool isDoubleClick, const char* text) throw(std::bad_alloc);
void _handleSelection(GtkWidget* list) noexcept(false);
void _handleClick(bool isDoubleClick, const char* text) noexcept(false);

void _resetDisplay() throw();
void _resetDisplay() noexcept(false);

void _createMeaning(const std::string& title, std::vector<std::string>& words)
throw(std::bad_alloc);
noexcept(false);

void _displayResults(const char* word) throw(Exception, std::bad_alloc);
void _displayAlternatives() throw(Exception, std::bad_alloc);
void _displayResults(const char* word) noexcept(false);
void _displayAlternatives() noexcept(false);

void _checkThesaurus() throw(Exception);
void _checkThesaurus() noexcept(false);

// static void _initResources() throw();
// static void _initResources() noexcept(false);

public:
Display(DialogMediator& parent) throw();
~Display() throw();
Display(DialogMediator& parent) noexcept(false);
~Display() noexcept(false);

const Aiksaurus& getThesaurus() const throw();
GtkWidget* getDisplay() throw();
const Aiksaurus& getThesaurus() const noexcept(false);
GtkWidget* getDisplay() noexcept(false);

void search(const char* word) throw(std::bad_alloc);
void showMessage(const char* message) throw();
void search(const char* word) noexcept(false);
void showMessage(const char* message) noexcept(false);
};

}
Expand Down
12 changes: 6 additions & 6 deletions plugins/aiksaurus/aiksaurusgtk3/Meaning.cpp
Expand Up @@ -9,7 +9,7 @@ using namespace std;
namespace AiksaurusGTK_impl
{

static void ucwords(string& str) throw()
static void ucwords(string& str) noexcept(false)
{
bool ws = true;
for(int i = 0;i < static_cast<int>(str.size());++i)
Expand All @@ -26,7 +26,7 @@ namespace AiksaurusGTK_impl
}

Meaning::Meaning(const string& title, vector<string>& words, Display& display)
throw(bad_alloc)
noexcept(false)
: d_title(title), d_words(words), d_display(display), d_lists(4), d_models(4)
{
d_masterLayout = gtk_event_box_new();
Expand Down Expand Up @@ -126,20 +126,20 @@ namespace AiksaurusGTK_impl

}

Meaning::~Meaning() throw()
Meaning::~Meaning() noexcept(false)
{

}

GtkWidget* Meaning::getLayout() throw()
GtkWidget* Meaning::getLayout() noexcept(false)
{
return d_masterLayout;
}


gint Meaning::_wordclick
(GtkTreeSelection *sel, gpointer data)
throw(std::bad_alloc)
noexcept(false)
{
Meaning *m = static_cast<Meaning*>(data);
GtkTreeView *tv = gtk_tree_selection_get_tree_view(sel);
Expand All @@ -159,7 +159,7 @@ namespace AiksaurusGTK_impl
}


void Meaning::unselectListsExcept(GtkWidget* list) throw()
void Meaning::unselectListsExcept(GtkWidget* list) noexcept(false)
{
for(int i = 0;i < static_cast<int>(d_lists.size());++i)
{
Expand Down
10 changes: 5 additions & 5 deletions plugins/aiksaurus/aiksaurusgtk3/Meaning.h
Expand Up @@ -28,18 +28,18 @@ namespace AiksaurusGTK_impl
GtkWidget* d_label;

static gint _wordclick(GtkTreeSelection *sel,
gpointer data) throw(std::bad_alloc);
gpointer data) noexcept(false);

public:

Meaning(const string& title, vector<string>& words, Display& display)
throw(std::bad_alloc);
noexcept(false);

~Meaning() throw();
~Meaning() noexcept(false);

GtkWidget* getLayout() throw();
GtkWidget* getLayout() noexcept(false);

void unselectListsExcept(GtkWidget* me) throw();
void unselectListsExcept(GtkWidget* me) noexcept(false);
};
}

Expand Down

0 comments on commit ef29fc9

Please sign in to comment.