Skip to content

Commit

Permalink
Fixed building for Linux and replace deprecated function QLineEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanAizek committed Aug 21, 2024
1 parent 32fa5a4 commit 22297e7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/IP_Edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void CustomLineEdit::keyPressEvent(QKeyEvent* event)
}

// Jump forward from last postion by right arrow
if (cursorPos == text().count()) {
if (cursorPos == text().length()) {
if (key == Qt::Key_Right) {
emit jumpForward();
event->accept();
Expand Down
4 changes: 2 additions & 2 deletions src/System_Info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2577,15 +2577,15 @@ bool System_Info::Scan_USB_Proc(QList<VM_USB>& list)
#include <QDir>
#include <QFileInfoList>

void System_Info::Get_Free_Memory_Size(int& allRAM, int& freeRAM)
void System_Info::Get_Free_Memory_Size(size_t& allRAM, size_t& freeRAM)
{
// proc fs is exists?
if (QFile::exists("/proc/meminfo")) {
QFile proc_file("/proc/meminfo");

if (!proc_file.open(QIODevice::ReadOnly | QIODevice::Text)) {
AQDebug("int System_Info::Get_Free_Memory_Size()",
"void System_Info::Get_Free_Memory_Size( int &allRAM, int "
"void System_Info::Get_Free_Memory_Size( size_t &allRAM, size_t "
"&freeRAM )");
}
else {
Expand Down
2 changes: 1 addition & 1 deletion src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class AQEMU_Main : public QObject
void upgrade_settings();
int find_data_folders();
void log_settings();
static int root_warning();
int root_warning();
void vm_dir_exists_or_create();

std::unique_ptr<QSettings> settings;
Expand Down

0 comments on commit 22297e7

Please sign in to comment.