Skip to content

Commit

Permalink
mimonscreenplugins: Stop using deprecated TR1 headers and namespaces
Browse files Browse the repository at this point in the history
All of this has been standardized since C++11 and these don't compile
anymore against LLVM 18.1.8 libc++.

src/mimonscreenplugins.cpp:22:10: fatal error: 'tr1/functional' file not found
   22 | #include <tr1/functional>
      |          ^~~~~~~~~~~~~~~~
  • Loading branch information
JamiKettunen committed Jan 6, 2025
1 parent b79a8a4 commit 41fcc8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/mimonscreenplugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <QDebug>

#include <algorithm>
#include <tr1/functional>
#include <functional>

using namespace std::tr1::placeholders;
using namespace std::placeholders;

namespace
{
Expand Down Expand Up @@ -116,10 +116,10 @@ bool MImOnScreenPlugins::isEnabled(const QString &plugin) const

std::remove_copy_if(mEnabledSubViews.begin(), mEnabledSubViews.end(),
std::back_inserter(mEnabledAndAvailableSubViews),
std::tr1::bind(&MImOnScreenPlugins::isSubViewUnavailable, this, _1));
std::bind(&MImOnScreenPlugins::isSubViewUnavailable, this, _1));

return std::find_if(mEnabledAndAvailableSubViews.begin(), mEnabledAndAvailableSubViews.end(),
std::tr1::bind(equalPlugin, _1, plugin)) != mEnabledAndAvailableSubViews.end();
std::bind(equalPlugin, _1, plugin)) != mEnabledAndAvailableSubViews.end();
}

bool MImOnScreenPlugins::isSubViewEnabled(const SubView &subView) const
Expand All @@ -136,7 +136,7 @@ QList<MImOnScreenPlugins::SubView> MImOnScreenPlugins::enabledSubViews(const QSt
{
QList<MImOnScreenPlugins::SubView> result;
std::remove_copy_if(mEnabledSubViews.begin(), mEnabledSubViews.end(),
std::back_inserter(result), std::tr1::bind(notEqualPlugin, _1, plugin));
std::back_inserter(result), std::bind(notEqualPlugin, _1, plugin));
return result;
}

Expand Down
2 changes: 0 additions & 2 deletions tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "mattributeextensionmanager.h"
#include "msharedattributeextensionmanager.h"

using namespace std::tr1;

typedef QSet<Maliit::HandlerState> HandlerStates;
Q_DECLARE_METATYPE(HandlerStates);
Q_DECLARE_METATYPE(Maliit::HandlerState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "mimserveroptions.h"
#include "mimsettingsqsettings.h"
#include <tr1/memory>
#include <memory>

#include <QtTest/QtTest>
#include <QObject>
Expand Down

0 comments on commit 41fcc8e

Please sign in to comment.