Fix build with glib-rs update

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2023-05-09 12:32:11 +04:00
parent fb86c7d1fe
commit 205f86ac50
6 changed files with 13 additions and 16 deletions

View File

@ -1,7 +1,4 @@
use std::env::args;
use std::error::Error;
use std::thread::sleep;
use std::time::Duration;
use std::{env::args, error::Error, thread::sleep, time::Duration};
use qemu_display::Display;

View File

@ -8,8 +8,7 @@ use uds_windows::UnixStream;
use zbus::zvariant::Fd;
use zbus::{dbus_interface, dbus_proxy, Connection};
use crate::util;
use crate::Result;
use crate::{util, Result};
#[derive(Debug)]
pub struct PCMInfo {

View File

@ -1,7 +1,9 @@
use std::io;
use windows::Win32::Foundation::{CloseHandle, HANDLE};
use windows::Win32::Networking::WinSock::{WSADuplicateSocketW, SOCKET, WSAPROTOCOL_INFOW};
use windows::Win32::System::Threading::PROCESS_ACCESS_RIGHTS;
use windows::Win32::{
Foundation::{CloseHandle, HANDLE},
Networking::WinSock::{WSADuplicateSocketW, SOCKET, WSAPROTOCOL_INFOW},
System::Threading::PROCESS_ACCESS_RIGHTS,
};
#[cfg(feature = "qmp")]
use uds_windows::UnixStream;
@ -52,8 +54,7 @@ impl ProcessHandle {
}
pub fn process_id(&self) -> crate::Result<u32> {
use windows::Win32::Foundation::GetLastError;
use windows::Win32::System::Threading::GetProcessId;
use windows::Win32::{Foundation::GetLastError, System::Threading::GetProcessId};
unsafe {
let pid = GetProcessId(self.0);

View File

@ -313,14 +313,14 @@ glib::wrapper! {
impl Display {
pub fn new(console: Console) -> Self {
let obj = glib::Object::new(&[]);
let self_ = imp::Display::from_instance(&obj);
let obj = glib::Object::builder().build();
let self_ = imp::Display::from_obj(&obj);
self_.console.set(console).unwrap();
obj
}
pub(crate) fn console(&self) -> &Console {
let self_ = imp::Display::from_instance(self);
let self_ = imp::Display::from_obj(self);
self_.console.get().unwrap()
}
}

View File

@ -306,7 +306,7 @@ impl App {
self.inner.clipboard.replace(Some(cb));
}
fn run(&self) -> i32 {
fn run(&self) -> glib::ExitCode {
self.inner.app.run()
}
}

View File

@ -13,4 +13,4 @@ futures = "0.3.13"
[dependencies.vte]
package = "vte4"
version = "0.5"
version = "0.6"