Commit 6e3cea22 authored by Jan Möbius's avatar Jan Möbius

Removed deprecated function calls

parent 5edaabda
...@@ -321,7 +321,7 @@ void Core::loadPlugins() ...@@ -321,7 +321,7 @@ void Core::loadPlugins()
for (int i = 0; i < pluginlist.size(); ) { for (int i = 0; i < pluginlist.size(); ) {
const QString bn = QFileInfo(pluginlist[i]).fileName(); const QString bn = QFileInfo(pluginlist[i]).fileName();
if (staticPlugins.contains(bn)) { if (staticPlugins.contains(bn)) {
emit log(LOGOUT, trUtf8("Not loading dynamic %1 as it is statically " emit log(LOGOUT, tr("Not loading dynamic %1 as it is statically "
"linked against OpenFlipper.").arg(bn)); "linked against OpenFlipper.").arg(bn));
pluginlist.removeAt(i); pluginlist.removeAt(i);
} else { } else {
......
...@@ -931,7 +931,7 @@ bool initializeSettings() { ...@@ -931,7 +931,7 @@ bool initializeSettings() {
//================================================================================================== //==================================================================================================
// Remember the main application directory (assumed to be one above executable Path) // Remember the main application directory (assumed to be one above executable Path)
applicationDir_ = QCoreApplication::applicationDirPath(); applicationDir_.setPath( QCoreApplication::applicationDirPath() );
// When using cmake, we get the absolute path to the Application directory via a define // When using cmake, we get the absolute path to the Application directory via a define
applicationDir_.cd(OPENFLIPPER_APPDIR); applicationDir_.cd(OPENFLIPPER_APPDIR);
......
...@@ -261,8 +261,8 @@ void Histogram::drawBar(QPainter *painter, Qt::Orientation, const QRect& rect) c ...@@ -261,8 +261,8 @@ void Histogram::drawBar(QPainter *painter, Qt::Orientation, const QRect& rect) c
const QRect r = rect.normalized(); const QRect r = rect.normalized();
const int factor = 125; const int factor = 125;
const QColor light(color.light(factor)); const QColor light(color.lighter(factor));
const QColor dark(color.dark(factor)); const QColor dark(color.darker(factor));
painter->setBrush(color); painter->setBrush(color);
painter->setPen(Qt::NoPen); painter->setPen(Qt::NoPen);
......
...@@ -415,7 +415,7 @@ static QString suggestSnapshotFilename(QString mostRecentPath) { ...@@ -415,7 +415,7 @@ static QString suggestSnapshotFilename(QString mostRecentPath) {
std::cout << "suggestSnapshotFilename(): Most recent path invalid. " std::cout << "suggestSnapshotFilename(): Most recent path invalid. "
"Doesn't exist. Returning empty string." << std::endl; "Doesn't exist. Returning empty string." << std::endl;
#endif #endif
return QString::null; return QString();
} }
QString base_name = fi.completeBaseName(); QString base_name = fi.completeBaseName();
...@@ -431,7 +431,7 @@ static QString suggestSnapshotFilename(QString mostRecentPath) { ...@@ -431,7 +431,7 @@ static QString suggestSnapshotFilename(QString mostRecentPath) {
std::cout << "suggestSnapshotFilename(): Regexp didn't match. This " std::cout << "suggestSnapshotFilename(): Regexp didn't match. This "
"should be impossible." << std::endl; "should be impossible." << std::endl;
#endif #endif
return QString::null; return QString();
} }
QString pre = base_name_re.cap(1), QString pre = base_name_re.cap(1),
...@@ -484,7 +484,7 @@ static QString suggestSnapshotFilename(QString mostRecentPath) { ...@@ -484,7 +484,7 @@ static QString suggestSnapshotFilename(QString mostRecentPath) {
std::cout << "suggestSnapshotFilename(): No luck incrementing file_no. " std::cout << "suggestSnapshotFilename(): No luck incrementing file_no. "
"Aborting, returning empty string." << std::endl; "Aborting, returning empty string." << std::endl;
#endif #endif
return QString::null; return QString();
} }
///Take a snapshot of the whole application ///Take a snapshot of the whole application
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
FilePicker::FilePicker(QWidget *parent) : FilePicker::FilePicker(QWidget *parent) :
QWidget(parent), QWidget(parent),
textBox_(new QComboBox), textBox_(new QComboBox),
browseButton_(new QPushButton(trUtf8("Browse..."))), browseButton_(new QPushButton(tr("Browse..."))),
recent_files_ini_key_("GenericFilePickerRecents"), recent_files_ini_key_("GenericFilePickerRecents"),
dialog_type_(DT_OPEN_FILE), dialog_type_(DT_OPEN_FILE),
overwrite_confirmed_by_user_(false) { overwrite_confirmed_by_user_(false) {
...@@ -60,7 +60,7 @@ FilePicker::FilePicker(QString recent_files_ini_key, ...@@ -60,7 +60,7 @@ FilePicker::FilePicker(QString recent_files_ini_key,
QWidget *parent) : QWidget *parent) :
QWidget(parent), QWidget(parent),
textBox_(new QComboBox), textBox_(new QComboBox),
browseButton_(new QPushButton(trUtf8("Browse..."))), browseButton_(new QPushButton(tr("Browse..."))),
recent_files_ini_key_(recent_files_ini_key), recent_files_ini_key_(recent_files_ini_key),
dialog_type_(dialog_type), dialog_type_(dialog_type),
overwrite_confirmed_by_user_(false) { overwrite_confirmed_by_user_(false) {
...@@ -114,8 +114,8 @@ bool FilePicker::confirm_overwrite_if_necessary() { ...@@ -114,8 +114,8 @@ bool FilePicker::confirm_overwrite_if_necessary() {
const QString file_name = QFileInfo(currentFileName()).fileName(); const QString file_name = QFileInfo(currentFileName()).fileName();
const QMessageBox::StandardButton result = const QMessageBox::StandardButton result =
QMessageBox::question( QMessageBox::question(
this, trUtf8("Overwrite File?"), this, tr("Overwrite File?"),
trUtf8("The file \"%1\" exists. " tr("The file \"%1\" exists. "
"Do you want to overwrite?") "Do you want to overwrite?")
.arg(file_name), .arg(file_name),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes | QMessageBox::No,
......
...@@ -79,7 +79,7 @@ int TextBrowserWidget::sideAreaWidth() { ...@@ -79,7 +79,7 @@ int TextBrowserWidget::sideAreaWidth() {
++digits; ++digits;
} }
int space = 3 + fontMetrics().width(QLatin1Char('9')) * digits; int space = 3 + fontMetrics().horizontalAdvance(QLatin1Char('9')) * digits;
return space; return space;
} }
......
...@@ -200,11 +200,11 @@ void SnapshotDialog::filenameChanged(const QString &new_filename) { ...@@ -200,11 +200,11 @@ void SnapshotDialog::filenameChanged(const QString &new_filename) {
if (!QFileInfo(fi.path()).isWritable()) { if (!QFileInfo(fi.path()).isWritable()) {
static const char *style = "background: #ffffcc;"; static const char *style = "background: #ffffcc;";
filename->setStyleSheet(style); filename->setStyleSheet(style);
warning_lb->setText(trUtf8("Warning: Folder not writable.")); warning_lb->setText(tr("Warning: Folder not writable."));
} else if (fi.exists()) { } else if (fi.exists()) {
static const char *style = "background: #ffcccc;"; static const char *style = "background: #ffcccc;";
filename->setStyleSheet(style); filename->setStyleSheet(style);
warning_lb->setText(trUtf8("Warning: File exists and will be " warning_lb->setText(tr("Warning: File exists and will be "
"overwritten without further warning.")); "overwritten without further warning."));
} else { } else {
static const char *style = ""; static const char *style = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment