mirror of
https://gitlab.com/marcandre.lureau/qemu-display.git
synced 2024-12-22 05:35:20 +00:00
Fix build with glib-rs update
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
fb86c7d1fe
commit
205f86ac50
@ -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;
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -13,4 +13,4 @@ futures = "0.3.13"
|
||||
|
||||
[dependencies.vte]
|
||||
package = "vte4"
|
||||
version = "0.5"
|
||||
version = "0.6"
|
||||
|
Loading…
Reference in New Issue
Block a user